You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Pid <pi...@pidster.com> on 2010/03/04 12:53:16 UTC

Re: Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is running?

On 04/03/2010 10:53, Chinmoy Chakraborty wrote:
> Hi All,
>
> Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is
> running? I tried to delete the jar from 'lib' after putting following entry
> in catalina.policy:

It might be possible, but it would be a *very* bad idea.

> grant codeBase "file:${catalina.home}/webapps/abcd/WEB-INF/lib" {
> permission java.io.FilePermission "read, write, delete";
> };
>
> but it was giving following error:
>
>   java.io.FileNotFoundException:
> C:\AppServer\Tomcat\apache-tomcat-6.0.10\webapps\
> abcd\WEB-INF\lib (Access is denied)...

Guess not then.

Is it smart for the application to try and delete it's own jar files?


p


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


Re: Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is running?

Posted by Mark Thomas <ma...@apache.org>.
On 04/03/2010 12:56, Chinmoy Chakraborty wrote:
> Actually I want to update the jar with the latest one inside 'lib'...and
> want to make our app hot-updatable. what would be a good idea for that?

Replace the WAR file with the a new version. Tomcat (with default
settings) will take care fo the rest.

Mark

> 
> 
> 
> On Thu, Mar 4, 2010 at 5:23 PM, Pid <pi...@pidster.com> wrote:
> 
>> On 04/03/2010 10:53, Chinmoy Chakraborty wrote:
>>
>>> Hi All,
>>>
>>> Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is
>>> running? I tried to delete the jar from 'lib' after putting following
>>> entry
>>> in catalina.policy:
>>>
>>
>> It might be possible, but it would be a *very* bad idea.
>>
>>
>>  grant codeBase "file:${catalina.home}/webapps/abcd/WEB-INF/lib" {
>>> permission java.io.FilePermission "read, write, delete";
>>> };
>>>
>>> but it was giving following error:
>>>
>>>  java.io.FileNotFoundException:
>>> C:\AppServer\Tomcat\apache-tomcat-6.0.10\webapps\
>>> abcd\WEB-INF\lib (Access is denied)...
>>>
>>
>> Guess not then.
>>
>> Is it smart for the application to try and delete it's own jar files?
>>
>>
>> p
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 




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


Re: Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is running?

Posted by Chinmoy Chakraborty <cc...@gmail.com>.
Thanks everyone for help.

Chinmoy

On Thu, Mar 4, 2010 at 6:43 PM, Michael Powe <mi...@trollope.org> wrote:

> On Thu, Mar 04, 2010 at 06:26:50PM +0530, Chinmoy Chakraborty wrote:
>
> > Actually I want to update the jar with the latest one inside 'lib'...and
> > want to make our app hot-updatable. what would be a good idea for that?
>
> Hello,
>
> See:
>
> http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
>
> in particular, the section on antiResourceLocking.  Note the caveats.
>
> Otherwise, undeploy the app, update your jars, and redeploy.
>
> Thanks.
>
> mp
>
> > On Thu, Mar 4, 2010 at 5:23 PM, Pid <pi...@pidster.com> wrote:
> >
> > > On 04/03/2010 10:53, Chinmoy Chakraborty wrote:
> > >
> > >> Hi All,
> > >>
> > >> Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is
> > >> running? I tried to delete the jar from 'lib' after putting following
> > >> entry
> > >> in catalina.policy:
> > >>
> > >
> > > It might be possible, but it would be a *very* bad idea.
> > >
> > >
> > >  grant codeBase "file:${catalina.home}/webapps/abcd/WEB-INF/lib" {
> > >> permission java.io.FilePermission "read, write, delete";
> > >> };
> > >>
> > >> but it was giving following error:
> > >>
> > >>  java.io.FileNotFoundException:
> > >> C:\AppServer\Tomcat\apache-tomcat-6.0.10\webapps\
> > >> abcd\WEB-INF\lib (Access is denied)...
> > >>
> > >
> > > Guess not then.
> > >
> > > Is it smart for the application to try and delete it's own jar files?
> > >
> > >
> > > p
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
>
> --
> Michael Powe            michael@trollope.org            Naugatuck CT USA
>
>  Any fool can paint a picture, but it takes a wise person to be able to
>  sell it.
>

Re: Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is running?

Posted by Michael Powe <mi...@trollope.org>.
On Thu, Mar 04, 2010 at 06:26:50PM +0530, Chinmoy Chakraborty wrote:

> Actually I want to update the jar with the latest one inside 'lib'...and
> want to make our app hot-updatable. what would be a good idea for that?

Hello,

See: 

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html 
 
in particular, the section on antiResourceLocking.  Note the caveats.

Otherwise, undeploy the app, update your jars, and redeploy.  

Thanks.

mp

> On Thu, Mar 4, 2010 at 5:23 PM, Pid <pi...@pidster.com> wrote:
> 
> > On 04/03/2010 10:53, Chinmoy Chakraborty wrote:
> >
> >> Hi All,
> >>
> >> Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is
> >> running? I tried to delete the jar from 'lib' after putting following
> >> entry
> >> in catalina.policy:
> >>
> >
> > It might be possible, but it would be a *very* bad idea.
> >
> >
> >  grant codeBase "file:${catalina.home}/webapps/abcd/WEB-INF/lib" {
> >> permission java.io.FilePermission "read, write, delete";
> >> };
> >>
> >> but it was giving following error:
> >>
> >>  java.io.FileNotFoundException:
> >> C:\AppServer\Tomcat\apache-tomcat-6.0.10\webapps\
> >> abcd\WEB-INF\lib (Access is denied)...
> >>
> >
> > Guess not then.
> >
> > Is it smart for the application to try and delete it's own jar files?
> >
> >
> > p
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >

-- 
Michael Powe		michael@trollope.org		Naugatuck CT USA

 Any fool can paint a picture, but it takes a wise person to be able to
 sell it.

Re: Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is running?

Posted by Chinmoy Chakraborty <cc...@gmail.com>.
Actually I want to update the jar with the latest one inside 'lib'...and
want to make our app hot-updatable. what would be a good idea for that?



On Thu, Mar 4, 2010 at 5:23 PM, Pid <pi...@pidster.com> wrote:

> On 04/03/2010 10:53, Chinmoy Chakraborty wrote:
>
>> Hi All,
>>
>> Is it possible to delete a jar file from ../WEB-INF/lib when Tomcat is
>> running? I tried to delete the jar from 'lib' after putting following
>> entry
>> in catalina.policy:
>>
>
> It might be possible, but it would be a *very* bad idea.
>
>
>  grant codeBase "file:${catalina.home}/webapps/abcd/WEB-INF/lib" {
>> permission java.io.FilePermission "read, write, delete";
>> };
>>
>> but it was giving following error:
>>
>>  java.io.FileNotFoundException:
>> C:\AppServer\Tomcat\apache-tomcat-6.0.10\webapps\
>> abcd\WEB-INF\lib (Access is denied)...
>>
>
> Guess not then.
>
> Is it smart for the application to try and delete it's own jar files?
>
>
> p
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>