wood burning stoves 2.0*
The moose likes Websphere and the fly likes JSTL declarations don't work on WAS6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JSTL declarations don Watch "JSTL declarations don New topic
Author

JSTL declarations don't work on WAS6

Xin Huang
Greenhorn

Joined: Jan 20, 2006
Posts: 2
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 ?
Xin Huang
Greenhorn

Joined: Jan 20, 2006
Posts: 2
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.
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

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.


A good workman is known by his tools.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSTL declarations don't work on WAS6