This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We have a J2EE application running on WAS5 over two years without problems.
Recently, we migrate the applcaition to WAS6. Because WAS6 comes with JSTL libraries like jstl.jar and standard.jar with .tld files inside, we removed jstl.jar and standard.jar from /WEB-INF/lib/, all .tld files from /WEB-INF/ and tag library declarations from we.xml. The reason doing those changes is we found out the differences by creating brand new web project in RAD6.
But the problem is after migration the tag library declarations do not work any more. We use a single jsp file including all the JSTL declarations. The jsps which need JSTL can simply use a static include like <%@ include file="includes/declarations.jsp" %> to refer to the library. This method has never had problems in the past two years in WAS5.
Because WAS6 comes with JSP2.0, we tried using JSP fragment to incorporate JSTL declarations by defining the fragment with <url-pattern> and <include-prelude> in web.xml, which is supposed to insert the fragment at the beggining of all jsps. By the way, we removed our static include from jsps to avoid confusions. It does not work out either.
Any IBM expert here has suggestions ?
Joined: Jan 20, 2006
There is one thing missing here. If I put JSTL declarations directly into each jsp, all tags work well. I do not want duplications though.
I'm surprised WSAD 5 didn't go crazy when you did this, but it sounds like a neat trick. Did you have all JSP code helper functionality disabled? I would expect yellow and red squiggly lines all over the place.
There's no way using fragments would have fixed it because they are dynamic, not static.
I don't understand the concern against "duplications" in this context. It's not any different than duplicating package and import declarations across Java classes and it does not improve maintainability.