----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Monday, May 19, 2008 5:27 PM
Subject: In memory copy of web.xml


Hi,

I am writing an application where we need to edit the client's web.xml
file to provide a context path to  a servlet inside our jars.
Right now, I am only able to eidt the web.xml file when Tomcat is
shutdown, as
the file is locked when Tomcat is running.

That actually doenst sound right... I've done that before, edit the web.xml and you can. You have to hit it one time though... because once you change it.... TC will start to go thru a
restart... ie it knows you messed with it and starts trying to fix itself.
So in theory if you have also manage to drop a new servlet in, and to get that right, you probably have to pack the whole things as classes and not jars... yes, after much pain... it will work... but it will still restart... so you are snookered.

And it wont restart, if something is in the web app and holding it... but when it goes... then it will restart... and while thats happening, bad luck if a customer hits it.
Your scheme is flawed... but its a cool idea ;)

====

Think about this rather....
You can make a servlet... and you can map it with a wild card

ie /webapp/futurestuff/*

Now ANYTHING, like
/webapp/futurestuff/aServletThatWeForgotAbout

is mapped to that servlet...

Then inside that FutureStuff servlet you check the URL...

If its aServletThatWeForgotAbout_1

then you load that class and run it...

The classes have to live in one of the libs or the webapp... and

if you look up

Class.forname("ComeLately");

you in business ;)

---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
---------------------------------------------------------------------------

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to