• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stopping an deployed application

 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In order to disable an deployed application i.e.stop receiving request,I am using the Manager web application.
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html
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?

Thanks
Pradeep
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more question: Is it possible that I programmtically make the web application to stop accepting request when the server restarts?

Thanks again!
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic