• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP Compiler

 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

By default my JSPs are getting compiled using Java 1.3


Which container(and version) are you using ?
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apachae Tomcat 5.0.3
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic