Community
Participate
Working Groups
Build Identifier: 3.6.2 When I create a Tag file in a java project (then register this tag file in TLD) and then I use this tag file in a JSP page in a webapp project that is depended on created java project, I get a warning "The tag handler class for "x:tag" (null) was not found on the Java Build Path" and there is no autocomplete for tag attributes. Reproducible: Always Steps to Reproduce: 1. create a Tag file in a java project and register this tag file in TLD (as specified in JSP 2.1 specification). 2. create a JSP page in a webapp project that is depended on this java project. 3. use the tag file from java project in created JSP page
If the java project is packed as JAR and added to webAppLibraries, everything is correct.
Thanks for your bug report. Right now, we're only checking the buildpath of any projects dependencies. Since it's likely that your TLD and tag file are outside of the buildpath for that project, we miss them. Would it be possible for you to share your example projects so that we make sure we account for your exact scenario? Thanks.
Created attachment 198307 [details] Sample projects with bug demonstration
Created attachment 198380 [details] Demonstration of similar problem when developing composed tag files in Java project
The same problem comes out when developing a tag file (in java project) that is composed from other tag files from the same project. See attachment 198380 [details].
Created attachment 198492 [details] patch Seems like the main trouble point was resolving the tag file when the TLD was not within the web content root of a dynamic web project. This patch should tolerate that now.
Code checked in for 3.3 maintenance.
Hello World! This feature is important for us, hence I took some time to test the fix. I used Eclipse 3.7.0 and updated WTP from wtp-repo-M-3.3.1-20110818013442.zip. Test projects attached to this bug seem to be working after import, but there are some oddities. 1. Import projects from attachment 198307 [details]. 2. Open WebProject/WebContent/index.jsp - code assist works properly for t:table. You may add a new t:table and someAttr is displayed in the list of available attributes. 3. Add a new required attribute to TagProject/src/META-INF/tags/test.tag (for example, <%@ attribute name="test" required="true" %>). 4. Go back to index.jsp - code assist does not show new attribute. 5. Remove projects from workspace and import them again - now error is displayed (missing required attribute) and new attribute is displayed by code assist.
Created attachment 201988 [details] Maven Test Project I prepared another test project. The problem is that code assist shows tag from jar but does not show its attributes. This is a Maven project, import it as existing Maven project. I used the following configuration: Eclipse 3.7.0, wtp-repo-M-3.3.1-20110818013442.zip, m2e 1.0.0, m2e-wtp 0.13.1.
I think that this issue is still not completely resolved, as Aliaksei Lahachou said, it is not working if TAG file is defined in maven project. I do not think that this is a maven issue.
That doesn't make sense. Let me put it this way: can it be reproduced *without* Maven and m2e being involved?
Created attachment 221251 [details] Standalone test project that shows the issue Standard java project that shows that the WTP JSP editor requires the implementation class of the tag and shows a warning if the class is missing.
Created attachment 221252 [details] Screenshot that displays the warning message
I can also reproduce the issue, the JSP editor in WTP shows a warning if only the TLD is on the classpath but the implementation class of the tag is not. However for tooling purposes the TLD should be sufficient. I've added a sample project (standard, not maven) and a screenshot for reference. Version: Juno Release Build id: 20120614-1722 Eclipse Java EE Developer Tools Version: 3.4.0.v201107072300-7b7JIM0FSK2WM1PS9Ar7AKUz0TrWn Build id: 20120518171617
(In reply to comment #14) > However for tooling purposes the TLD should be sufficient. Not always. For tags in the TLD that specify a TagExtraInfo class, we require the class file to properly determine additional local Java variables that will ultimately be in the Servlet service method. If it were specified, there should be a warning about it not being available as well. Both of these warnings are controllable from the Errors/Warnings->Custom Actions section of the Web->JSP->Validation preference page. Attachment 221251 [details] from comment 12 doesn't use a .tag file, so it is unrelated to the original problem. Re-resolving. The problems in comment 8 and comment 9 sound different from the original reported issue (problem refreshing what's known about the tag; does it help to close and reopen the JSP Editor?) and should be a separate bug report.