History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-19575
Type: Bug Bug
Status: Open Open
Assignee: Dmitry Avdeev
Reporter: Stephen Friedrich
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

tag descriptor: tag-file, path is resolved incorrectly

Created: 12 Sep 08 19:04   Updated: 16 Sep 08 02:30
Component/s: J2EE.JSP

File Attachments: None
Image Attachments:

1. noattributes.png
(4 kb)

2. tag.png
(6 kb)

Build: 8,792


 Description  « Hide
IDEA tried to resolve a path for a tag file relative to the WEB-INF folder.
It highlight this tag-file-declaration, even though it is correct and works:
<tag-file>
        <name>titledBox2</name>
        <path>/WEB-INF/tags/titledBox2.tag</path>
    </tag-file>

That's incorrect. See JSP (2.0) spec, section "8.4.2 Packaging in a JAR":
"which define the tag name and the full path of the tag file from the root of the JAR, respectively."

("8.4.3 Packaging Directly in a Web Application" also uses this path context.)



 All   Comments   Work Log   Change History      Sort Order:
Stephen Friedrich - 12 Sep 08 19:32
I have to declare the tag file in the tld, because there are other (classic) tags that should be in the same tag library.

The worst effect of this is that IDEA does not know about the tag's attributs, so it gives an error in the error and code completion and validation of names of the attributes is not available.


Stephen Friedrich - 15 Sep 08 11:53
I got lucky: BEA WebLogic also supports
<path>tags/titledBox.tag</path>
for a file in /WEB-INF/tags/titledBox2.tag
I don't see how that is supported by the spec, though.
Also see the J2EE tutorial at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags6.html#wp90207
path: This must begin with /WEB-INF/tags/ if the tag file resides in the WAR, or /META-INF/tags/ if the tag file resides in a JAR.

Stephen Friedrich - 16 Sep 08 02:30
I tried to create a test project and finally found the reason:
In my project the tld file is deployed as a deployment descriptor and the "tags" directory is deployed as a "Web Resource Directory".
(Please don't ask - this is a project where the directory structure and ant file is foobar. I am too afraid to change anything, because the setup is so fragile.)

See the example project attached to IDEADEV-12405