This content has been marked as final.
Show 3 replies
-
1. Re: jsp static import
jaikiran Nov 12, 2007 1:32 AM (in response to creatureoflegend)I am using JBoss version 4.0.3SP1
I guess, you wont be able to achieve this in JBoss 4.0.3. Starting JBoss4.0.4GA, a compilerSourceVM parameter is made available for JSP compiler. This parameter can be set in the conf/web.xml folder present in %JBOSS_HOME%\server\< serverName>\deploy\jbossweb-tomcat55.sar folder. This web.xml contains the following:<servlet> <servlet-name>jsp</servlet-name> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> <init-param> <param-name>fork</param-name> <param-value>false</param-value> </init-param> <init-param> <param-name>xpoweredBy</param-name> <param-value>false</param-value> </init-param> <!-- Uncomment to use jdk1.5 features in jsp pages <init-param> <param-name>compilerSourceVM</param-name> <param-value>1.5</param-value> </init-param> -->
Uncommenting that portion is enough and you will be able to compile that JSP without any problems. This parameter is not available for 4.0.3, so you might have to upgrade to a later version of JBoss.
By the way, for using static imports you dont have to use JDK6. Static imports were introduced in Java 5 : http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#static_import -
2. Re: jsp static import
creatureoflegend Nov 12, 2007 5:23 PM (in response to creatureoflegend)Cool. Thank you very much! :)
-
3. Re: jsp static import
bvogt Feb 1, 2008 6:01 AM (in response to creatureoflegend)just an update for AS 4.2.0 (current users of RH Application Stack):
although the comment in web.xml states:<!-- compilerTargetVM Compiler target VM --> <!-- default is System.properties --> <!-- java.specification.version > 1.4 --> <!-- [1.5] else [1.4] --> <!-- --> <!-- compilerSourceVM Compiler source VM --> <!-- default is System.properties --> <!-- java.specification.version > 1.4 --> <!-- [1.5] else [1.4] -->
and boot.log reports:11:43:27,272 DEBUG [ServerInfo] java.specification.version: 1.5
the <init-param> definition below has to be added in order to successfully compile 1.5 jsps