You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Afkham Azeez <af...@gmail.com> on 2010/07/07 15:26:39 UTC

Re: Undeploying webapp programatically

Hi,
 I'm using embedded Tomcat 5.5.23. I undeploy the webapps
programmatically using the following code segment:

host.removeChild(context);

Now, when I send a request to the context which was undeployed, I get
an HTTP 503. But I expect to get an HTTP 404 since that resource is
not actually available. It seems that the webapp is not completely
getting undeployed. What should I do to completely undeploy the webapp
so that I get a 404 when a request to the undeployed webapp is made?

 Thanks
Azeez



--
Afkham Azeez
Senior Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.;
http://wso2.com
Member; Apache Software Foundation; http://www.apache.org/
email: azeez@wso2.com cell: +94 77 3320919
blog: http://blog.afkham.org
twitter: http://twitter.com/afkham_azeez
linked-in: http://lk.linkedin.com/in/afkhamazeez

Lean . Enterprise . Middleware

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


Re: Undeploying webapp programatically

Posted by Afkham Azeez <af...@gmail.com>.
I was able to resolve this. It may be helpful for somebody looking for
this information.

After calling host.removeChild(context), you need to call,
((StandardContext)context).destroy(); Only when destroy is called the
context gets completely removed.

Thanks
Azeez

On Wed, Jul 7, 2010 at 7:12 PM, Mark Thomas <ma...@apache.org> wrote:
> On 07/07/2010 14:26, Afkham Azeez wrote:
>> Hi,
>>  I'm using embedded Tomcat 5.5.23. I undeploy the webapps
>> programmatically using the following code segment:
>>
>> host.removeChild(context);
>>
>> Now, when I send a request to the context which was undeployed, I get
>> an HTTP 503. But I expect to get an HTTP 404 since that resource is
>> not actually available. It seems that the webapp is not completely
>> getting undeployed. What should I do to completely undeploy the webapp
>> so that I get a 404 when a request to the undeployed webapp is made?
>
> Those are all questions for the users list, not the dev list.
>
> Mark
>
>

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


Re: Undeploying webapp programatically

Posted by Mark Thomas <ma...@apache.org>.
On 07/07/2010 14:26, Afkham Azeez wrote:
> Hi,
>  I'm using embedded Tomcat 5.5.23. I undeploy the webapps
> programmatically using the following code segment:
> 
> host.removeChild(context);
> 
> Now, when I send a request to the context which was undeployed, I get
> an HTTP 503. But I expect to get an HTTP 404 since that resource is
> not actually available. It seems that the webapp is not completely
> getting undeployed. What should I do to completely undeploy the webapp
> so that I get a 404 when a request to the undeployed webapp is made?

Those are all questions for the users list, not the dev list.

Mark



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