How to recognize "tagdir" tags?
My project is a web module with JSPs that use several taglibs. IDEA is fully supporting taglibs identified by "uri" to match TLD files in the libraries.
But I've added a local taglib based on .tag files in the directory /WEB-INF/tags/chrome. Deployed, they work as expected, and IDEA's editor accepts the taglib declaration just fine, resolving the tagdir value to the actual directory.
]]>
But if I actually use any of these tags, ie.
This is the "demo" tag]]>
they show up in red with "Cannot resolve symbol chrome:demo". Even though the tag file is indeed WEB-INF/tags/chrome/demo.tag, and works fine in the deployed app. Anyone know why IDEA's editor can't recognize the tags that go with this taglib?
请先登录再写评论。
your WEB-INF directory seems not marked as WebResource directory with
prefix WEB-INF
Paul Anderson wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
I should have mentioned that /WEB-INF is indeed set as a web resource directory for the project. I even removed it and re-set it.
IDEA handles the <%@ taglib %> declaration itself fine, despite the red text these forums are putting there. The tagdir="/WEB-INF/tags/chrome" attribute is recognized as the web resource.
It's the actual tags themselves that show up red and unresolvable. And if I start any tag with the stated prefix, <chrome:, IDEA has no suggestions.
Interesting update - when I moved the <%@ taglib %> to a separate file and <%@ included %> it, suddenly the tags all resolve.
If I change it back, they still resolve.
Looks like another case of IDEA not completely updating what it thinks it knows.