tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pier...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper Constants.java
Date Sat, 09 Dec 2000 05:45:48 GMT
pierred     00/12/08 21:45:48

  Modified:    jasper/src/share/org/apache/jasper Constants.java
  Log:
  Cleaned up the default list of imports.
  Details (long) below.
  
  The list of "default" imports used in Jasper was as follows
  
    1) default import list as defined in spec (section 2.10.1.1 p.47)
  
  	"javax.servlet.*",
  	"javax.servlet.jsp.*",
  	"javax.servlet.http.*",
  
    2) Not in the default import list of the spec, but should be
       in it. [--> to be fixed in spec]
  
          "javax.servlet.jsp.tagext.*",
  	"java.io.IOException",
  
    3) Jasper specific runtime environment
  
  	"org.apache.jasper.runtime.*",
  	"org.apache.jasper.JasperException"
  
    4) beans import
  
  	"java.beans.*",
  
    5) Imports we were doing but should not have been
  
  	"java.io.PrintWriter",
  	"java.io.FileInputStream",
          "java.io.ObjectInputStream",
  	"java.util.Vector",
  	"java.beans.*",
  
  I've cleaned it up by getting rid of the import list in 5).
  
  Regarding 4) (java.beans.*):
  In the JSP1.2 PFD, section 4.1 p. 65, it is said:
  
  "If the object is not found in the specified scope; and beanName is
  given, then the method instantiate() of java.beans.Beans will be
  invoked with the ClassLoader of the Servlet object and the beanName as
  arguments. If the method succeeds, the new object reference is
  associated the with the scripting variable and with the specified name
  in the specified scope using the appropriate scope dependent
  association mechanism (see PageContext). After this, step 7 is
  performed."
  
  Given this, the java.beans.Beans class is required. I therefore think
  that it should be in the default import list. (Jasper currently requires
  it).
  
  The new 'default' import list in Jasper therefore looks as follows
  (as of my last commit):
  
  	"javax.servlet.*",
  	"javax.servlet.jsp.*",
  	"javax.servlet.http.*",
          "javax.servlet.jsp.tagext.*",
  	"java.io.IOException",
  	"java.beans.Beans,"
  	"org.apache.jasper.runtime.*",
  	"org.apache.jasper.JasperException"
  
  I've run watchod (jsp tests) as well as all the examples
  in tomcat and all ran fine.
  
  Please let me know if I'm missing something, and if that default
  list should be modified.
  
      -- Pierre
  
  Revision  Changes    Path
  1.5       +6 -7      jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/Constants.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Constants.java	2000/10/04 05:10:45	1.4
  +++ Constants.java	2000/12/09 05:45:47	1.5
  @@ -89,16 +89,15 @@
       /**
        * These classes/packages are automatically imported by the
        * generated code. 
  -     *
  -     * FIXME: Need to trim this to what is there in PR2 and verify
  -     *        with all our generators -akv.
        */
       public static final String[] STANDARD_IMPORTS = { 
  -	"javax.servlet.*", "javax.servlet.http.*", "javax.servlet.jsp.*", 
  +	"javax.servlet.*", 
  +	"javax.servlet.http.*", 
  +	"javax.servlet.jsp.*", 
           "javax.servlet.jsp.tagext.*",
  -	"java.io.PrintWriter", "java.io.IOException", "java.io.FileInputStream",
  -        "java.io.ObjectInputStream", "java.util.Vector",
  -	"org.apache.jasper.runtime.*", "java.beans.*",
  +	"java.io.IOException", 
  +	"java.beans.Beans",
  +	"org.apache.jasper.runtime.*", 
   	"org.apache.jasper.JasperException"
       };
   
  
  
  

Mime
View raw message