Jo�o Robertson Kramer Santana wrote:
>
> Is it possible to do it with a directory outside TOMCAT's scope
> 

 It depends on the security settings of your servlet
container. Some containers, like Tomcat, let you set up
security sandboxes. If the setting say you can't, then
what you want is not possible. You'll need to check
with your container administrator for details.

 Otherwise, you can just use the normal java.io.* classes. 


> I want my servlet to check a directory content every 5
> minutes. 
>

 Servlets don't really have a life outside serving
requests. When there's no request, there's no servlet.
Servlets aren't generally an appropriate choice for
long running background tasks.

 That said, it is possible (although ugly) to force
servlets to go against their nature and do this sort
of thing. More information at:

  http://www.distributopia.com/servlet_stuff/background_threads.txt

 The awful thing is, even if you do it wrong it will
probably still work. But six months from now when your
company upgrades its serlvet container, you start getting
bizarre and impossible-to-reproduce errors.


-- 
Christopher St. John [EMAIL PROTECTED]
DistribuTopia http://www.distributopia.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to