Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why Not 1.5 By Default?

 
Brandon Tom
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Arun Boraiah
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Brandon Tom:
Why is it recommended that we stick with 1.4 when developing JSP?


By who?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Brandon Tom
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, stupid question, I complete forgot about RMI
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic