2 Replies Latest reply on Sep 20, 2012 3:56 AM by jfclere

    JBoss AS7.1.1 - JSP implicit package import


      Currently migrating my web application from Weblogic 10.3.5 to JBoss AS7.1.1.


      I have this in my web.xml - Servlet API 2.3,


      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">


      In some JSP's, no import statements available for classes like 'java.util.Date', 'java.util.Iterator' etc. In weblogic, these classes get implicitly imported and getting

      executed fine.


      In JBoss this throws error like 'Unable to compile class for JSP ... Date cannot be resolved to a type'. I can manually add the necessary import statements in

      my JSP to make it work fine, but just curious if there is a way in JBoss to achieve implicit package import similar to weblogic.

        • 1. Re: JBoss AS7.1.1 - JSP implicit package import

          The spec doesn't mandate implicit import of those packages, so I don't think JBossWeb adds those implicit imports.

          1 of 1 people found this helpful
          • 2. Re: JBoss AS7.1.1 - JSP implicit package import

            The jsp-2_2 specs says: (Table JSP.1-8 Page Directive Attributes)


            Packages java.lang.*, javax.servlet.*, javax.servlet.jsp.*, and

            javax.servlet.http.* are imported implicitely by the JSP

            container. No other packages may be part of this implicitely

            imported list


            So having java.util.* in the implicited import probably breaks the JSP specs...