Servlet 2.5 Automatic imports and JSP errors
Started on: 05 December 12
Participants: 1
I am in the process of moving from Weblogic 8.1 to 10.3.4. Currently, I am updating various things such as our deployment descriptors. We have changed from Servlet version 2.3 to Version 2.5.
Since the change I have came across several jsps that fail to compile at runtime. It was mentioned that they failed because some necessary classes for that jsp was not imported.
In our webapp our web.xml was Servlet version 2.3 with the following
So i have now changed it to 2.5 as requested by my client
For examplea Calendar (java.util) that i have used, failed to write the import declaration for it. For some reason in 2.3 this didn't seem to matter.
Does anyone know if this was a feature of 2.3 that certain classes were imported when the import was not declared. I want them to be imported properly but I fear that a few other jsps will fail.
Someone please enlighten me please?
This challenge is listed under
Development & Implementations
and E-Commerce
Community
Related Posts:
1 Suggestion
According to: http://docs.oracle.com/cd/E12840_01/wls/docs103/webapp/weblogic_xml.html
Implicit Servlet 2.5 Package Imports
The Servlet 2.5 specification mandates that only the java.lang.*, javax.servlet.*, javax.servlet.jsp.*, and javax.servlet.http.* packages be implicitly imported. In compliance with the Servlet 2.5 specification, WebLogic Server will only import these mandated packages.
Whereas, previous releases of WebLogic Server also imported the java.io.*, java.util.*, and javax.servlet.jsp.tagext.* packages.
WebLogic Server will follow the previous 2.4 or earlier behavior and import the non-mandated packages, if any of the following occur:
Since you have migrated from 2.3, my guess is that WebLogic Server have already import the non-mandated packages, just that it is not in the specs.
You could use the weblogic appc compiler (or jspc, but it's deprecated) to precompile the JSPs and see which ones don't compile.
See http://docs.oracle.com/cd/E12840_01/wls/docs103/webapp/reference.html#wp57794