| Summary: | Taglibs referenced in included files aren't loaded | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Nitin Dahyabhai <thatnitind> | ||||
| Component: | jst.jsp | Assignee: | Nitin Dahyabhai <thatnitind> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P2 | CC: | david_williams, gunnar, jeff, jochen.riedlinger, loskutov, thogau | ||||
| Version: | 0.7.1 | ||||||
| Target Milestone: | 1.0 M7.1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Nitin Dahyabhai
Fixed in HEAD *** Bug 84425 has been marked as a duplicate of this bug. *** (In reply to comment #1) > Fixed in HEAD I just updated to 1.0M3 but I am still unable to use auto-completion for taglibs included with the : <%@ include file="/xxxx.jsp"%> However auto-completion works just fine in the file xxxx.jsp itself. Shouldn't this type of inclusions be supported by Eclipse? Yes, where is "/" referring to, the root of the project? The "/" is not referring to the root of my project. I am using appfuse (https://appfuse.dev.java.net/) and the directory structure doesn't allow me to have my project recognized as a real Eclipse J2EE web project. Do you think this can be the reason? If not, here are relevant info concerning my directory structure: - web pages are under /web - the .jsp page including taglib declarations is : /web/common/pages (auto-completion is working in this file). - I have /web/common/header.jsp. In the top of this file I have : <%@ include file="/common/taglibs.jsp"%> and I can not have completion working in this file. I have tried to replace with : <%@ include file="taglibs.jsp"%> (relative) or <%@ include file="/common/taglibs.jsp"%> (absolute from project root directory) but it doesn't work either. I am Sorry there was a typo in the previous comment : - the .jsp page including taglib declarations is : /web/common/taglibs.jsp Changed Version field given new release numbering. Yes, that's probably the reason. The definition of "/" depends on the project being one of our flexible Java projects. Otherwise it's assumed to be the parent of the WEB-INF folder that is found in one of the .jsp file's parent folders. This bug is not resolved /WebContent/common/taglibs.jsp <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> <%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %> /WebContent/main/index.jsp <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> <%@include file="/common/taglibs.jsp" %> However auto-completion works just fine in the file taglibs.jsp itself. Inside of TLDCMDocumentManager.DirectiveStructuredRegionHandler.processInclude, the URIHelper used to normalize the included file URI into a path is returning references starting with "/" as-is instead of making it relative to the supplied root path. *** Bug 104981 has been marked as a duplicate of this bug. *** Created attachment 25385 [details]
patch to handle simple /-starting cases
Patch committed to HEAD. Hopefully this is the last piece before we truly support flexible modules. *** Bug 106115 has been marked as a duplicate of this bug. *** Approved in 9/1/2005 telecon for 0.7.1. Patch applied to maintenance branch. We've just noticed this had mistakenly not been released to 0.7.1 build yet. Expect to see in M builds > 9/20 it is still not fixed in 1.0M8. if I have a jsp which include a fragment with the taglib-directives like this: [...] <%@ include file="/common/jstl_1.1_taglibs.jspf" %> [...] where the file "jstl_1.1_taglibs.jspf" lokks like: <%@ taglib uri="/WEB-INF/tlds/jstl/c.tld" prefix="c" %> <%@ taglib uri="/WEB-INF/tlds/jstl/fmt.tld" prefix="fmt" %> <%@ taglib uri="/WEB-INF/tlds/jstl/fn.tld" prefix="fn" %> <%@ taglib uri="/WEB-INF/tlds/jstl/x.tld" prefix="x" %> but if I include the jsp fragment like: <%@ include file="../common/jstl_1.1_taglibs.jspf" %> verything works fine. So was the "/"-Patch for the injclude of a jspf which has the taglib directives inside or the uri attribute in the taglib element? The patch addressed locating the included file itself. The parent folder of WEB-INF is what we currently consider as '/'. Verified in WTP 1.5 RC5a Closing |