Reputation: 10866
I am using jboss with jdk1.6... Using Generics heavily in my java code and it works fine. But when I use in jsp; it fails compiling .. Looks like JSP Container is using jdk1.4..
How do I make JSP container also use same JDK as my jboss is using ?
Upvotes: 0
Views: 382
Reputation:
Tomcat 5.5.20 uses Servlet 2.4 and JSP 2.0 for J2EE 1.4 platform. JDK 1.5 introduces generics, which allows you to abstract over types.
So, in your case if you are upgrading JDK you should reinstalled your servlet container. But notice, that JBoss 4.2.0 and upwards doesn't come bundled with Tomcat and called JBossWeb. It's independent Tomcat code base. So, you can't upgrade Tomcat without upgrading JBoss.
See Also
Upvotes: 1
Reputation: 7449
i had the same problem
The type Collection is not generic; it cannot be parameterized with arguments
<? extends E>
and the cause was the evil "cryptix-jce-compat.jar" in the classpath.
this evil jar contains an java/util/List.class
as well as java/util/ArrayList.class
(and all the others) which hide the relative jre classes.
check if you have a similar situation, maybe jarscan can help
Upvotes: 1
Reputation: 2741
I found this code from run.bat
in JBoss 4.0.5 GA bin folder
rem Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
rem compatible distribution to which JAVA_HOME points
set JAVAC_JAR=%JAVA_HOME%\lib\tools.jar
According to this, if you point the JAVA_HOME
to JDK 1.6 properly. it should compile the jsps with that version
Upvotes: 0