Seak, Teng-Fong wrote:
Nikola Milutinovic wrote:
Tomcat 5 supports all the features of the underlying JVM, the problem
is in the JSPs. They are compiled by Jasper + Eclipse compiler
module, which, in version 5.5.9, has no support for Java5. Later
versions of Tomcat have a newer version of Eclipse Compiler and it
works. Also, you can plugin manually a newer version of Eclipse
compiler, try to search the mailing list for posts on how to do it
(simple, if I remember correctly).
I would just forget about it. Nowadays, a simple search would give
hundreds, if not thousands or millions, results. The problem is I
don't know what keyword(s) to use. Last time I spent quite a lot of
time (at least half an hour) to find out that Tomcat (well, JSP)
couldn't support Java5.
Well, just to clarify, JSPs *can* run Java5 idioms - if you provide
Tomcat with a JSP/Java compiler that will undestand them. Servlets are
compiled by you and will have no problems running on the desired JVM.
OTOH, having Java code in JSPs is evil and should be moved to Servlets
or Struts Actions or whatever is the equivalent in Java ServerFaces. JSP
are for displaying only.
Having said that, I must contradict myself here. I have found that
sometimes having a bit of Java code in JSP can clarify things, but it
can also bring in a nightmare, especially with JSF. Keep Java code in
JSPs to the minimum and if you have to use it, use it for presentation
logic only. Business logic should be elsewhere.
Nix.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]