This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Servlets and the fly likes bundling filewatcher in web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "bundling filewatcher in web application" Watch "bundling filewatcher in web application" New topic

bundling filewatcher in web application

Mohit Sinha
Ranch Hand

Joined: Nov 29, 2004
Posts: 125
All - I have implemented a simple file watcher listening to a particular shared directory for reading new files. This code is actually part of large code base which is shipped as a web application so don't have the option to run it as standalone program. I wanted to check how best can i put the file watcher in action to run it every time the web app is up.
Is servlet listener the right option or message driven bean?

Let know your thoughts.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

If you want to do something when the web app starts, a context listener is what you seek.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: bundling filewatcher in web application
It's not a secret anymore!