I am finally getting to work on Tomcat 5.5 container after years of working on Tomcat 4.1.27. Please advise what already comes with Tomcat 5.5? I think it has Generics and Expression Language (EL) with the standard install? Any other major features? I assume it doesnt come with Struts and JSTL?
Generics are a part of Java 5, not Tomcat. But since Java 5 is required to run Tomcat 5 (unless you go the extra mile and install the Java 1.4 compatibility package), you can generally use Java 5 code when running under Tomcat 5.
EL is part of JSP, and supported out of the box. I think JSTL needs to be installed separately, but all that involves is dropping two jar files into the common/lib directory and you're done. Struts, too, is a separate install (although that would be part of each web app that uses it, not of Tomcat itself).
Ping & DNS - updated with new look and Ping home screen widget
Joined: Oct 11, 2007
Thanks for quick response.
Can you put the Struts jar files in the main home (TomcatHome\common\lib\) folder so everyone can use it and not have to put it in each individual web app?
Joined: Mar 22, 2005
I'm not sure if that'll work if there is more than one web app using it. There may be static resources cached on a per-classloader basis. It's probably best to ask in the Struts forum.
The Apache Tomcat homepage lists the differences between the different Tomcat versions. Tomcat 5.5 implements version 2.4 of the servlet specification and version 2.0 of the JSP specification; Tomcat 4.1 implements servlets 2.3 and JSP 1.2.
The "which version?" page has a list of differences between Tomcat 5.0/5.5 and 4.1.
Originally posted by Ulf Dittmer: Generics are a part of Java 5, not Tomcat. But since Java 5 is required to run Tomcat 5 (unless you go the extra mile and install the Java 1.4 compatibility package), you can generally use Java 5 code when running under Tomcat 5.
One caveat. Starting with version 5.5 Tomcat now ships with the JDT compiler (from the folks at Eclipse) for compiling JSPs. I know that, in 5.5, this compiler wasn't completely 1.5 ready. This means that you can use all the 1.5 features in any classes that you compile yourself (serlvets, beans, etc) but you might run into trouble if you try to use those features in scriptlet code from within your JSPs.