Proper way to implement footer.jsp that depends on taglibs in header.jsp
I have a footer.jsp which has something like the following code:
Logout ]]>
Works great, everything's beautiful, but IntelliJ code inspector gives me a yellow indicator instead of my precious green square because it doesn't understand the "sec" taglib which is declared in header.jsp :(. What is the proper way to satisfy IntelliJ? Should I have the sec taglib declaration in both the header.jsp and footer.jsp? Seems redundant and ugly.
Please sign in to leave a comment.
Hi,
I'm wondering how could intellij know which taglib's against which to parse the file. Seems like 'double work' of including them here and in the header.jsp is warranted.
Can you envision any way this could work without the double includes?
cheers,
steveb
If IntelliJ were to parse static includes and propagate its knowledge of @included stuff to the files they're included in it would work.
But the performance penalty of such an action could well be unacceptable.
It's rather telling that no IDE I know of over the lifetime of JSP has ever done this (and I started using JSP back in 1999).
You may want to create JSP 2.0 preludes / codas jsp files
Scott Mueller wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
and do not forget the fact that you can include the same jsp in different parents.
And ... it would be a very bad practice, but nothing prevents you from associating different taglibs with the same prefix in those different parents ...
Hi Maxim,
(note i'm not the author, but still interested..) Thanks for that post about preludes/codas. I did not know abt them, and they look promising