Monday, November 16, 2009

Migration from Tomcat 5.5 to Tomcat 6.0.20

The migration from Tomcat 5.5 to Tomcat 6.0.20 was relatively painless except for the 3 following issues I encountered.


Issue #1: Unable to read TLD issue

Turns out that I was including a copy of jsp-api-2.0.jar in the build of my WEB-INF/lib directory, and Tomcat already had it in its lib folder. Deleting the jar from my WEB-INF/lib directory fixed the problem.

Reference:
http://forums.sun.com/thread.jspa?threadID=580206&am

Issue #2: Missing mail.jar
Add the mail.jar to lib folder of Tomcat 6





Issue #3: Different Enum behaviour with JSTL


Don't use enum values directly in JSTL. Instead provide a getter method to retrieve the value such as getValue() and invoke ${enum.value} rather than just ${enum}. In Tomcat 5.5 the behaviour was if you had ${enum} internally it would return enum.toString(). Now with Tomcat 6 and as per section 1.18.2 of the 2.1 JSP-EL spec, the behaviour now returns enum.name(). So if you want the return the toString() value create and invoke getValue().

Reference:
https://issues.apache.org/bugzilla/show_bug.cgi?id=46920

No comments:

Post a Comment