jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Products » Websphere
Bookmark "JSTL declarations don Watch "JSTL declarations don New topic

JSTL declarations don't work on WAS6

Xin Huang

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

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

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.
I agree. Here's the link: http://aspose.com/file-tools
subject: JSTL declarations don't work on WAS6
It's not a secret anymore!