Ok, it's taken me a few days to see this one.

Why does the list saying that an object is used mean it must be 
imported?  Similarly why shoudlwe import the jasper class when they 
could potantially conflict with user imported classes?  Why can't we 
jsut use the fully qualified name to refrence these classes?  Just call 
java.beans.Beans.instantiate() insted of doing an import?  and 
org.apache.jasper.Whatever instead of doing the import so we can import 
Whatever?

I think that keeping the import list to what is required by the spec and 
refrencing all of the other object we need to compile by the fully 
qualified name will result in less un-intended colissions.

so ... -0, I think a thread on this should start but at the same time I 
don't want to halt this patch yet.

--Danno

[EMAIL PROTECTED] wrote:

> 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
>   

Reply via email to