Sorry if this is a stupid question, but I just started learning java about a month ago.
My development environment is J2SE 5.0 and Tomcat 5.5.9. When I'm writing servlets, or any other classes that I directly compile myself I can use the new J2SE 5.0 features (the collection based for loop, generic classes, etc). In fact in the case of collections I get warnings if I don't use the generics.
However when I write a JSP, if I try to use the 5.0 features such as the collection based for loop or the generics class types, tomcat won't compile the JSP. Am I doing something wrong, or do I am I forced to use 1.4 features only in JSPs?
The Java compiler from Eclipse JDT in included as the default compiler. It is an advanced Java compiler which will load all dependencies from the Tomcat class loader, which will help tremendously when compiling on large installations with tens of JARs. On fast servers, this will allow sub-second recompilation cycles for even large JSP pages. This new compiler will be updated to support the Java 5 syntax as soon as possible.
It should be possible to configure Tomcat to use the Sun JDK compiler. Or you can switch to an earlier stable Tomcat version (I think 5.0.28).