-
JSP incompatible with Java 5 in RAD 7 (2 messages)
- Posted by: narendra bhatti
- Posted on: March 16 2007 17:46 EDT
Hello, Iam trying to use Java 5 features in JSP page. Its compiling fine. Here's the snippet List alist = new ArrayList(); alist.add("test"); for (int i=0;i<alist.size();i++) { out.write(alist.get(0)); out.write("\n"); } But, when iam trying to execute the JSP page on server (WAS 6.1 Server within RAD 7). Iam getting the error "Syntax error, parameterized types are only available if source level is 5.0" I dont know how to change JSP compiling to source level 5. Iam using RAD 7 JRE in the server which is 1.5.0. Iam not sure why iam getting the error. any help is appreciated ThanksThreaded Messages (2)
- Did you got the Solution? by Venkat Avala on June 10 2008 09:57 EDT
- From http://ecovations.de/blog/?p=43 by Alex Townsend on January 06 2009 10:16 EST
-
Did you got the Solution?[ Go to top ]
- Posted by: Venkat Avala
- Posted on: June 10 2008 09:57 EDT
- in response to narendra bhatti
Hi Narendra, I am also having the same problem.Please let me know if you have the solution for "JSP incompatible with Java 5 in RAD 7" . Thanks in advance. -
From http://ecovations.de/blog/?p=43[ Go to top ]
- Posted by: Alex Townsend
- Posted on: January 06 2009 10:16 EST
- in response to narendra bhatti
When writing a web application to host in WebSphere Application Server 6.1 (WAS), you can use all the features available in Java version 5.0. But surprisingly you cannot use them in a JSP, there, the source level is set down to Java 1.3. Don’t ask me why. I had to find out recently when using Generics in a JSP. But, don’t worry, it is just a matter of configuration when you do need special Java 5.0 or 1.4 features in a JSP. All you have to do is put the following entry into the file WEB-INF/ibm-web-ext.xmi: http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tweb_jspengine.html http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/rweb_jspengine.html