> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Heske Chris
>
> Typically, a change to a class that is referenced in a JSP (or
> servlet) requires you to restart the JRun service in order to flush
> the "stale" class and reload the new class.  This is a painful
> process for developers sharing a common JRun development environment.
>  JRun does automatically recompile and reload the servlet if there is
> a change to the JSP page but does not reload any of the referenced
> classes.
>
> Do any of the competing JSP/Servlet engines support auto-reloading of
> classes (beans) based on a change to the underlying class file
> without having to restart the JSP engine?
>
> Is there an elegant way to force JRun to reload classes referenced by
> a servlet without restarting the engine?

Yes, it is a pain isn't it.

I understand that if the JSP servlet was loaded as a servlet (ie from a
location that the servlet engine performs auto re-loading) rather than via
the class path it would probably work (it does with GNUJsp and JSERV).
However this might be difficult to achieve with JRUN - you'd need to
separate out the required class files for the JSP servlet.

I suppose you could use GNUJsp (with JRUN) - put the classes in with the
rest of your servlet classes.

I don't think many servlet engines will work so that other referenced
classes will re-load if the main servlet/JSP class hasn't changed (too much
of an overhead?).

I used to use a horrible method whereby I made a request to a servlet that
simply called System.exit() - luckily(!) the servlet engine used to get
re-started... :-)
Another nicer method that seemed to work for me was to make a request to a
simple servlet (ie one not referenced via classpath) that you know has been
re-compiled - this should force all classes to be re-loaded (that weren't
loaded via classpath)?

HTH,

Steve S

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to