• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Compiler

 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default my JSPs are getting compiled using Java 1.3 source tag, how can i make them to compile using 1.5?
As a result of this am not able to use generics in my JSPs.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a result of this am not able to use generics in my JSPs

Which can be a good thing, as you're not supposed to use any Java code in JSP
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Right
Thats why am pushing for EL's , JSTL so much in my product.

Well on other hand, still i want an answer to my question.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By default my JSPs are getting compiled using Java 1.3

Which container(and version) are you using ?
 
praseedha sai
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepak,

If you are using Eclipse IDE, select your project,
right click on project->
select preoperties ->
click on compiler->
click on use project settings->
click on comile and classfiles tabbed pane and select cinpilence level from drop -down list and clck on ok, I hope it will work.

Cheers,
Rao S.
SCJP 87%
target wcd
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apachae Tomcat 5.0.3
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which can be a good thing, as you're not supposed to use any Java code in JSP
But Java EE 5 compliance requires a Java SE 5 compatible SDK. So even if you don't put Java code in JSP scriptlets yourself, there might be Java 5 features (namely generics or possibly auto-(un)boxing) generated by the container... then the JSPs wouldn't compile anyway*, through no fault of your own

I've never seen a container do that before though, so can't help the original poster I'm afraid. I'm sure standard debugging techniques will solve the problem -- they usually do. An upgrade of the Tomcat version to 5.5 (or 6.0) would probably also help.


* Note: container dependent. So I'm not saying they actually won't compile if the page uses Java 1.3 source compatibility, but that compilation isn't guaranteed given the Java EE 5 requirements.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic