You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nitschke Michael <mn...@mbi.co.at> on 2003/08/19 13:30:18 UTC

about web.xml and servlet mapping and reloading

I try to dynamically create and change servlet mapping in the web.xml in
full production mode and then reload/reread the web.xml to update the
mapping, but as i read in the manage application:

<quote>NOTE: The /WEB-INF/web.xml web application configuration file is
not reread on a reload. If you have made changes to your web.xml file
you must stop then start the web application. </quote>

it does not work like i need it, because the tomcat should not be
restarted (loss of temporary data).

Is there a way to keep the mappings available for tomcat and reloadable
(no tomcat restart requiered).

 

Thanx Mike


Re: about web.xml and servlet mapping and reloading

Posted by John Turner <to...@johnturner.com>.
Reloading/restarting your web application is not the same as 
reloading/restarting Tomcat.  You can reload/restart web applications 
without restarting Tomcat.  That's what the manager app is for, and that 
documentation says that a web app reload will not re-read web.xml, you 
need a web app restart, not a Tomcat restart.

John

Nitschke Michael wrote:

> I try to dynamically create and change servlet mapping in the web.xml in
> full production mode and then reload/reread the web.xml to update the
> mapping, but as i read in the manage application:
> 
> <quote>NOTE: The /WEB-INF/web.xml web application configuration file is
> not reread on a reload. If you have made changes to your web.xml file
> you must stop then start the web application. </quote>
> 
> it does not work like i need it, because the tomcat should not be
> restarted (loss of temporary data).
> 
> Is there a way to keep the mappings available for tomcat and reloadable
> (no tomcat restart requiered).
> 
>  
> 
> Thanx Mike
> 
> 



Re: about web.xml and servlet mapping and reloading

Posted by Tim Funk <fu...@joedog.org>.
1) Stop and start the context. Reload only dumps the classloader and creates 
a new one.
2) Use a persistent manager (JBDC, file, ...) which will probably still be 
required with a context stop/start

-Tim

Nitschke Michael wrote:
> I try to dynamically create and change servlet mapping in the web.xml in
> full production mode and then reload/reread the web.xml to update the
> mapping, but as i read in the manage application:
> 
> <quote>NOTE: The /WEB-INF/web.xml web application configuration file is
> not reread on a reload. If you have made changes to your web.xml file
> you must stop then start the web application. </quote>
> 
> it does not work like i need it, because the tomcat should not be
> restarted (loss of temporary data).
> 
> Is there a way to keep the mappings available for tomcat and reloadable
> (no tomcat restart requiered).
> 
>  
> 
> Thanx Mike
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: about web.xml and servlet mapping and reloading

Posted by John Turner <to...@johnturner.com>.
Reloading/restarting your web application is not the same as 
reloading/restarting Tomcat.  You can reload/restart web applications 
without restarting Tomcat.  That's what the manager app is for, and that 
documentation says that a web app reload will not re-read web.xml, you 
need a web app restart, not a Tomcat restart.

John

Nitschke Michael wrote:

> I try to dynamically create and change servlet mapping in the web.xml in
> full production mode and then reload/reread the web.xml to update the
> mapping, but as i read in the manage application:
> 
> <quote>NOTE: The /WEB-INF/web.xml web application configuration file is
> not reread on a reload. If you have made changes to your web.xml file
> you must stop then start the web application. </quote>
> 
> it does not work like i need it, because the tomcat should not be
> restarted (loss of temporary data).
> 
> Is there a way to keep the mappings available for tomcat and reloadable
> (no tomcat restart requiered).
> 
>  
> 
> Thanx Mike
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: about web.xml and servlet mapping and reloading

Posted by Tim Funk <fu...@joedog.org>.
1) Stop and start the context. Reload only dumps the classloader and creates 
a new one.
2) Use a persistent manager (JBDC, file, ...) which will probably still be 
required with a context stop/start

-Tim

Nitschke Michael wrote:
> I try to dynamically create and change servlet mapping in the web.xml in
> full production mode and then reload/reread the web.xml to update the
> mapping, but as i read in the manage application:
> 
> <quote>NOTE: The /WEB-INF/web.xml web application configuration file is
> not reread on a reload. If you have made changes to your web.xml file
> you must stop then start the web application. </quote>
> 
> it does not work like i need it, because the tomcat should not be
> restarted (loss of temporary data).
> 
> Is there a way to keep the mappings available for tomcat and reloadable
> (no tomcat restart requiered).
> 
>  
> 
> Thanx Mike
> 
> 


RE: about web.xml and servlet mapping and reloading

Posted by Steph Richardson <st...@kvasar.com>.
I messed around with this quite a bit because of context-params that we kept updating in web.xml, but that didn't update when we did
a reload.
I read the documentation that said that stop & restart of a web-app would reread the web.xml, however in our version 4.0.6 this was
NOT the case.
We have moved to tomat 4.1.24, and it now detects that the web.xml has been changed and rereads it ( exactly when it get's reread
seems to be an un-exact science - but if you do a reload it happens straight away ), so it's not a problem anymore.
Of course I don't know if the servlet container updates it's mappings in accordance with the now re-read web.xml


Steph



> -----Original Message-----
> From: Mike Curwen [mailto:gb_dev@gb-im.com]
> Sent: Tuesday, August 19, 2003 9:48 AM
> To: 'Tomcat Users List'
> Subject: RE: about web.xml and servlet mapping and reloading
>
>
> As I read it, you are asked to stop and start the *web application* not
> Tomcat.
>
> So instead of a single 'reload' click, you must first click 'stop' and
> then 'start'.
>
>
>
> > -----Original Message-----
> > From: Nitschke Michael [mailto:mnitschke@mbi.co.at]
> > Sent: Tuesday, August 19, 2003 6:30 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: about web.xml and servlet mapping and reloading
> >
> >
> > I try to dynamically create and change servlet mapping in the
> > web.xml in full production mode and then reload/reread the
> > web.xml to update the mapping, but as i read in the manage
> > application:
> >
> > <quote>NOTE: The /WEB-INF/web.xml web application
> > configuration file is not reread on a reload. If you have
> > made changes to your web.xml file you must stop then start
> > the web application. </quote>
> >
> > it does not work like i need it, because the tomcat should
> > not be restarted (loss of temporary data).
> >
> > Is there a way to keep the mappings available for tomcat and
> > reloadable (no tomcat restart requiered).
> >
> >
> >
> > Thanx Mike
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>


RE: about web.xml and servlet mapping and reloading

Posted by Steph Richardson <st...@kvasar.com>.
I messed around with this quite a bit because of context-params that we kept updating in web.xml, but that didn't update when we did
a reload.
I read the documentation that said that stop & restart of a web-app would reread the web.xml, however in our version 4.0.6 this was
NOT the case.
We have moved to tomat 4.1.24, and it now detects that the web.xml has been changed and rereads it ( exactly when it get's reread
seems to be an un-exact science - but if you do a reload it happens straight away ), so it's not a problem anymore.
Of course I don't know if the servlet container updates it's mappings in accordance with the now re-read web.xml


Steph



> -----Original Message-----
> From: Mike Curwen [mailto:gb_dev@gb-im.com]
> Sent: Tuesday, August 19, 2003 9:48 AM
> To: 'Tomcat Users List'
> Subject: RE: about web.xml and servlet mapping and reloading
>
>
> As I read it, you are asked to stop and start the *web application* not
> Tomcat.
>
> So instead of a single 'reload' click, you must first click 'stop' and
> then 'start'.
>
>
>
> > -----Original Message-----
> > From: Nitschke Michael [mailto:mnitschke@mbi.co.at]
> > Sent: Tuesday, August 19, 2003 6:30 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: about web.xml and servlet mapping and reloading
> >
> >
> > I try to dynamically create and change servlet mapping in the
> > web.xml in full production mode and then reload/reread the
> > web.xml to update the mapping, but as i read in the manage
> > application:
> >
> > <quote>NOTE: The /WEB-INF/web.xml web application
> > configuration file is not reread on a reload. If you have
> > made changes to your web.xml file you must stop then start
> > the web application. </quote>
> >
> > it does not work like i need it, because the tomcat should
> > not be restarted (loss of temporary data).
> >
> > Is there a way to keep the mappings available for tomcat and
> > reloadable (no tomcat restart requiered).
> >
> >
> >
> > Thanx Mike
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: about web.xml and servlet mapping and reloading

Posted by Mike Curwen <gb...@gb-im.com>.
As I read it, you are asked to stop and start the *web application* not
Tomcat.
 
So instead of a single 'reload' click, you must first click 'stop' and
then 'start'.
 


> -----Original Message-----
> From: Nitschke Michael [mailto:mnitschke@mbi.co.at] 
> Sent: Tuesday, August 19, 2003 6:30 AM
> To: tomcat-user@jakarta.apache.org
> Subject: about web.xml and servlet mapping and reloading
> 
> 
> I try to dynamically create and change servlet mapping in the 
> web.xml in full production mode and then reload/reread the 
> web.xml to update the mapping, but as i read in the manage 
> application:
> 
> <quote>NOTE: The /WEB-INF/web.xml web application 
> configuration file is not reread on a reload. If you have 
> made changes to your web.xml file you must stop then start 
> the web application. </quote>
> 
> it does not work like i need it, because the tomcat should 
> not be restarted (loss of temporary data).
> 
> Is there a way to keep the mappings available for tomcat and 
> reloadable (no tomcat restart requiered).
> 
>  
> 
> Thanx Mike
> 
> 


RE: about web.xml and servlet mapping and reloading

Posted by Mike Curwen <gb...@gb-im.com>.
As I read it, you are asked to stop and start the *web application* not
Tomcat.
 
So instead of a single 'reload' click, you must first click 'stop' and
then 'start'.
 


> -----Original Message-----
> From: Nitschke Michael [mailto:mnitschke@mbi.co.at] 
> Sent: Tuesday, August 19, 2003 6:30 AM
> To: tomcat-user@jakarta.apache.org
> Subject: about web.xml and servlet mapping and reloading
> 
> 
> I try to dynamically create and change servlet mapping in the 
> web.xml in full production mode and then reload/reread the 
> web.xml to update the mapping, but as i read in the manage 
> application:
> 
> <quote>NOTE: The /WEB-INF/web.xml web application 
> configuration file is not reread on a reload. If you have 
> made changes to your web.xml file you must stop then start 
> the web application. </quote>
> 
> it does not work like i need it, because the tomcat should 
> not be restarted (loss of temporary data).
> 
> Is there a way to keep the mappings available for tomcat and 
> reloadable (no tomcat restart requiered).
> 
>  
> 
> Thanx Mike
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org