- From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
- Date: Tue, 15 Jun 1999 11:02:48 +0200
- To: dpwhite@halcyon.com, Jigsaw Mailing List <www-jigsaw@w3.org>
"David P. White" wrote: > Santiago Gala wrote: > > > > >From Jigsaw documentation: > > > > How does Jigsaw load local servlet classes ? > > > > Jigsaw use a local ClassLoader to load servlet classes from the servlets Directory. If a servlet > > class is modified when Jigsaw is running, the ClassLoader load automatically the new class. It's a > > very useful feature for servlets developers. > > > > In the two first versions of Jigsaw2.0 (beta1 and beta2) this feature can be disabled because in > > some case the auto-reload feature could create some problems. In those versions there is a > > auto-reload flag in ServletWrapper. > > > > Now this problem has been resolved and we don't need the auto-reload flag anymore. But the > > auto-reload feature works only for the servlet classes located in the servlet directory. Servlets in the > > CLASSPATH are loaded by the system ClassLoader and their modified classes are not reloaded > > while the server is running. > > > > So I think that the servlet is loaded with a local ClassLoader, but the support classes get loaded from the system class loader. Something that > > could be interesting is to have a "jar wrapper", that takes a jar with a servlet and a bunch of support classes, but maintains the idea of > > auto-reloading. I don't know if it is difficult to implement, but it would be handy for servlet development. > > I agree with your assessment of the problem I am having. If this is > true, does it not seem like this would be a problem for others as well? > After all, how frequently will a servlet NOT depend on other classes? If > servlet developers are to take advantage of Java's scoping capabilities > (in this case package level restrictions), how can this work? > > Cheers, > > David If you want to use servlets that depends on other classes (in a protected way) you can: 1) put all these classes under the servlet directory. 2) Let the servlet class in the CLASSPATH with the other classes and setup the ServletWrapper manually. Regards, Benoit. -- - Benoît Mahé ------------------------------------------------------- World Wide Web Consortium (W3C) Architecture domain - Jigsaw Engineer http://www.w3.org/People/Mahe - bmahe@w3.org ---------------------------------------------------------------------
Received on Tuesday, 15 June 1999 05:03:19 UTC