On Fri, 11 Oct 2002, caowei wrote:

> Date: Fri, 11 Oct 2002 09:10:00 +0800
> From: caowei <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: about reload configuration file in struts 1.1 b2
>
>
>
>
>  hi,
>
>  who could tell me how to reload struts-config.xml and tiles-defs.xml in
> struts1.1?
>
>  tomcat can't reload them even use (reloadable="true") in the
> server.xml!
>
>  and i didn't want to use
> http://localhost:8080/manager/reload?path=/test, because the
> session/servertContext will be lost.
>

You can make sure that this is not the case (which will likely be required
for *any* server, not just Tomcat) by following a couple of simple rules:

* For session attributes, make sure that they implement
  java.io.Serializable (and that any classes used in instance
  variables are also Serializable).  Tomcat 4+, at least, will
  save and restore these sessions and their attributes for you.

* For context attributes, make sure that your webapp startup procedures
  properly restore anything that needs to be there.  For a servlet 2.3
  or later container, the proper way to do this is with a class that
  implements ServletContextListener, regsitered in a <listener> element
  in your web.xml file.

Proper application architecture will avoid any reloadability problems.

>  tks a lot!
>
>  Regards,
>
>  badi
>

Craig McClanahan



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to