• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Stopping an deployed application

 
Ranch Hand
Posts: 8944
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: 8944
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.
 
For my next trick, I'll need the help of a tiny ad ...
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic