MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

Servlet 2.5 Automatic imports and JSP errors

0
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
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
So i have now changed it to 2.5 as requested by my client
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
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?



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:

WebLogic

 

WebLogic 8.1

 

WebLogic 10.3.4

 

Servlet Version 2.3

 

Servlet Version 2.5

 

Java Server Page (JSP)

 

Initiator

Clev
Clev
  Follow

My name is Clev Vladimir, I am in love with the web and the webpage i weave. I specializes in developing efficient and secure Web applications, and in designing beautiful, user-friendly and cross-browser compatible user interfaces. I primarily use a combination of XHTML, HTML5, CSS3, jQuery, JSON, XML, PHP,JAVA and MySQL, but I’m eager to learn and expand upon those languages. I graduated from Princeton University with a B.S. in Computer Science. If you have a project in mind, need a fresh perspective, or just some help meeting deadlines, don’t hesitate to get in touch with me to see how I can help.

1 Suggestion

  1. 05 December 12
    0



    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:

    • The backward-compatible flag is set to true in the weblogic.xml descriptor file.
    • The web application version is 2.4 or earlier.
    • The individual JSP/TAG files in a version 2.5 web application are version 2.0 or earlier.


    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

Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top