>From Glenn's mail
When Jasper is run in a servlet container it no longer puts the class files
in a package, they are now
in the default package.

>From the current (I think) public draft, jsp12.pdf: (emphasis mine)

The JSP Page implementation object belongs to an implementation-dependent
___named___
package. The package used may even vary between one JSP and another, so
minimal
assumptions should be made. One implication of this is that classes in the
unnamed package
should not be used without an explicit "import" of the class.


If I read this correctly, the classes are required to _not_ be in the
default package.

-----Original Message-----
From: Glenn Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 02, 2001 8:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Tomcat 4 SecurityManager and Jasper ClassLoader changes


In answer, here is a copy of the original message I posted.

Glenn

-------- Original Message --------
Subject: Tomcat 4 Jasper ClassLoading changes to support SecurityManager
Date: Thu, 25 Jan 2001 16:46:20 -0600
From: Glenn Nielsen <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

In order to make it easier to integrate the SecurityManager into Jasper
for Tomcat 4 and to change some of Japsers annoying behaviours, I have
been working on switching Jasper over to the URLClassLoader.

I have the class loading changes in place and Jasper passes all watchdog
tests.  I wanted to run these changes past everyone before I finish
cleaning up the changes and committing it.  (I still have some work to
do on JspC and still need to add support for the SecurityManager.)

Jasper now creates a URLClassLoader for each JSP page and defers any other
class loading to the web app context class loader.  Using a single class
loader per JSP allowed me to remove all the code that increments the
class version number, i.e. the work directory no longer has multiple
*.java and *.class files for the same JSP page.  These changes also made
it easy for me to put the java source and class files in the same directory
tree as found in the web app context.  When Jasper is run in a servlet
container it no longer puts the class files in a package, they are now
in the default package.

These changes simplified the code quite a bit and also gave a performance
improvement.

When running watchdog tests the new jasper was ~25% faster than the current
jasper on a first compile or on first jsp class access after restart.  
On recompile of a jsp page it was 37% faster.  Execution of JSP servlet
after it had already been compiled and loaded was slightly faster.

Regards,

Glenn

Mel Martinez wrote:
> 
> --- Glenn Nielsen <[EMAIL PROTECTED]> wrote:
> > I have completed the changes necessary to implement
> > the Java SecurityManager
> > in Tomcat 4.  I have also completed switching Jasper
> > over to using the
> > URLClassLoader.
> 
> Glenn,
> 
> Could you describe (briefly) the nature of the change
> in terms of the API?  I.E. Did you just reimplement
> JasperLoader to extend URLClassLoader or did you
> create a new loader class entirely?
> 
> I am currently using the tc3.x jasper API by extending
> it (to add a variety of needed features) and am going
> to have to make the plunge to tc4.x eventually.  Up
> till now I am pretty sure I've avoided any dependency
> that would preclude using the tc4.x version.  Just
> staying on my toes here.
> 
> Thanks,
> 
> Mel
> 
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

-- 
----------------------------------------------------------------------
Glenn Nielsen             [EMAIL PROTECTED] | /* Spelin donut madder    |
MOREnet System Programming               |  * if iz ina coment.      |
Missouri Research and Education Network  |  */                       |
----------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
<><><><><><><><><><><><><><><><><><><><><>This electronic mail transmission
may contain confidential information and is intended only for the person(s)
named.  Any use, copying or disclosure by any other person is strictly
prohibited.  If you have received this transmission in error, please notify
the sender via e-mail. <><><><><><><><><><><><><><><><><><><><><>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to