wood burning stoves 2.0*
The moose likes JSP and the fly likes Why Not 1.5 By Default? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Why Not 1.5 By Default?" Watch "Why Not 1.5 By Default?" New topic
Author

Why Not 1.5 By Default?

Brandon Tom
Ranch Hand

Joined: Jan 11, 2006
Posts: 48
Just out of curiosity. Why is it recommended that we stick with 1.4 when developing JSP? I wrote a class library that makes extensive use of generics, and I was surprised when I had to force Tomcat to compile in 1.5. The question is why did I have to do this?


Brandon Tom, SCJP, MCP<br />Programmer/Graphic Designer<br /><a href="http://mailto:tombrand@hawaii.edu" target="_blank" rel="nofollow">tombrand@hawaii.edu</a>
Arun Boraiah
Ranch Hand

Joined: Nov 28, 2001
Posts: 233
It depends which version of servlet engine (tomcat) your are using. If the servlet engine is not supporting or older version, such message would be given.


Sharing is learning
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

Originally posted by Brandon Tom:
Why is it recommended that we stick with 1.4 when developing JSP?


By who?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Tomcat 5.5 is compiled and runs well under Java 1.5.
Your servlet, bean, and custom tag code should run fine with 1.5 features.

Starting with version 5.5 Tomcat ships with the JDT compiler (by the folks at Eclipse) for compiling JSPs. The advantage of this is that you no longer need a full JDK in order to run a JSP app under Tomcat.
One issue, however, is that JDT doesn't yet support all of the 1.5 features of Java.

One workaround is to configure Tomcat to use Sun's compiler.
See the Tomcat documentation for doing this.
A better workaround would be to move all of your Java code out of the JSPs and into your servlets and javabeans.

http://www.google.com/search?hl=en&q=JDT+Jasper+1.5+generics+Tomcat+&btnG=Google+Search


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Brandon Tom
Ranch Hand

Joined: Jan 11, 2006
Posts: 48
By who?


By NetBeans. When you create a new web project it says the source should be set to 1.4 for J2EE 1.4 projects. I don't know why setting it to 1.5 would cause a problem.
Brandon Tom
Ranch Hand

Joined: Jan 11, 2006
Posts: 48
Nevermind, stupid question, I complete forgot about RMI
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why Not 1.5 By Default?
 
Similar Threads
Vote here: I'm studying for the SCJP 1.5 exam
how many questions do you answere correctly
Betwixt Problem...
Compiling applets
Please help