• Post Reply Bookmark Topic Watch Topic
  • New Topic

detect when jsp app is undeployed

 
Mike Ottinger
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

My application generates some important logs for the user. I want to detect when the application is being undeployed and invoke say an ant script that goes to those logs and zips them up and stores them somewhere safe. How does one detect the undeployment of the application? Is this is an application-server specific thing? I'm running JRun4. Any advice on this would help a lot. Thanks.

- Mike
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Programatically? From within the web app itself? You could use a context listener.

From outside the app? That'd be system dependent.
 
Mike Ottinger
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, so use something like: javax.servlet.ServletContextListener
to capture the event. Now, I'm running JRun4 which is JSP 1.2 supported, is this an issue? I've been burned trying to implement a technology/solution that JRun 4 doesn't handle.(think JSTL) Thanks for the info!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Context listeners were introduced in Servlet 2.3.
Check to see that your container supports that version.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!