[EMAIL PROTECTED] wrote:
>
> On Thu, 12 Apr 2001, Luise Massimo wrote:
>
> > Hi all,
> > i have a simple question for which i haven't found an answare by myself: why
> > for the same JSP page tomcat generate a new java/class file in work dir for
> > every modification ?
>
> Reloading issues.
>
> "Normal" reloading ( that is used for regular servlets ) is implemented by
> replacing the ClassLoader ( after you load a class with a class loader,
> you just can't load a newer version ). This creates a number of problems -
> all other servlets and classes must be reloaded, session objects and
> attributes must also be reloaded ( class loaders define separate
> namespaces, objects loaded with sibling loaders can't communicate ).
>
> Jasper ( and any other system that generates servlets ) has another option
> - to generate a new class name and use the old loader. Given that JSPs are
> typically modified many times this saves a lot of overhead.
>
> This is not an absolute requirement - it's easy to change jasper to use
> the "servlet" reloading mechanism ( unfortunately you can't use versioning
> on regular servlets - since the class name is fixed ).
>
> Costin
Reloading is not an issue in the Tomcat 4 version of Jasper. It no longer
uses the .java/.class versioning system because it uses a URLClassLoader for
each JSP page compiled into a servlet. That way if the page is recompiled
the URLClassLoader for the JSP page itself can be dumped without affecting
the rest of the Context.
Regards,
Glenn
----------------------------------------------------------------------
Glenn Nielsen [EMAIL PROTECTED] | /* Spelin donut madder |
MOREnet System Programming | * if iz ina coment. |
Missouri Research and Education Network | */ |
----------------------------------------------------------------------