Glenn Nielsen wrote:

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

I'm a little uncomfortable with making Jasper's servlets not belong to a package
any longer.  My issue relates to developers who (mistakenly) try to reference
beans in <jsp:useBean> that are not in any package -- currently, that does not
work in Tomcat, or in any other container that uses an implicit package.  But,
with this change, such an incorrect bean usage would work in Tomcat, but would
cause portability problems for apps that depend on that behavior.

I'd much rather see the generated servlets that Jasper creates continue to be
placed in a package, to protect developers from themselves on this issue.

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

That's great!

>
> Regards,
>
> Glenn
>

Craig



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

Reply via email to