Our app (built using servlets & jsps) runs on an application server. I have a situation where I need to know if a file is present in a particular location. This file is created after the user logs on and it will be posted in a certain location. I'm trying to implement a listener so that I can give the file to the user after it has been created and posted. Any ideas on how to to achieve this? Also, if you have any questions, please let me know. Thanks in advance, Srinivas
Well, you can create a thread that sleeps most of the time, but every second/minute/hour/whatever wakes up and looks for the file. You can check for a specific file name, or use File.listFiles() combined with File.lastModified() to search for any new files in a particular directory.