learn java
The moose likes Tomcat and the fly likes Stopping an deployed application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Stopping an deployed application" Watch "Stopping an deployed application" New topic

Stopping an deployed application

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8920

In order to disable an deployed application i.e.stop receiving request,I am using the Manager web application.
But I find that when I restart the server the web application accepts request => the stopping of application is temporary. I want the web application not to receive requests over server restarts. How do I do that?


Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8920

One more question: Is it possible that I programmtically make the web application to stop accepting request when the server restarts?

Thanks again!
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I think what you're really looking for is to 'undeploy' the application. Remove it entirely from the view of Tomcat, and it won't start.

Be careful using the Manager app to 'remove' an application!!! It will *delete* (in an unrecoverable way) the entire folder containing your deployed web app. This is not such a big deal if you've got a backup somewhere else.

Otherwise, you could set up a Filter that maps to all request (/*). The filter could check some "other area" to determine whether to respond to requests (pass it along the chain) or whether to 'drop' it (simply return, or optionally show a 'not available' page).

The "other area" can be anything like a database, a file, etc. This 'other area' can be programatically accessed.
Have you tried LearnNowOnline? http://www.learnnowonline.com/
subject: Stopping an deployed application