facebook

jsp compilation problem with jboss 4.0.5, source level 5

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #264028 Reply

    I am developing on Windows XP Pro and using JBoss 4.0.5.GA as my development server and eclipse 3.2.1 with MyEclipse Enterprise Workbench 5.1.0.GA and Sun JDK 1.5.0_09 as my JVM.

    When I use Java 5 specific features (generics) in a scriptlet section of a JSP page, JBoss throws the following:

    An error occurred at line: 9 in the jsp file: my.jsp
    Generated servlet error:
    Syntax error, parameterized types are only available if source level is 5.0

    What is strange is that I only have JDK 1.5 installed on my computer. I also have defined the 1.5 JDK in eclipse preferences “Java -> Installed JREs” and “MyEclipse -> Application Servers -> JBoss 4 -> JDK” (using jdk not jre). If I deploy to tomcat 5, I do not have this problem.

    Has anyone had any problems with this or know of a workaround?

    Thanks for any assistance,

    Lloyd

    #264031

    ok, just found the answer.

    In order to fix this problem, you need to modify the ${JBOSS_HOME}/server/${INSTANCE}/deploy/jbossweb-tomcat55.sar/conf/web.xml file. In the jsp <servlet> section, uncomment the compilerSourceVM <init-param> entry.

    tomcat seems to get the jdk version from System.properties and default to 1.5. I’m not sure why JBoss does this differently.

    Lloyd

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: jsp compilation problem with jboss 4.0.5, source level 5

You must be logged in to post in the forum log in