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.


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 So if you want the return the toString() value create and invoke getValue().


No comments:

Post a Comment