aspose file tools*
The moose likes Servlets and the fly likes How to run JSP or Servlets in background? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to run JSP or Servlets in background?" Watch "How to run JSP or Servlets in background?" New topic
Author

How to run JSP or Servlets in background?

Steven Ho
Greenhorn

Joined: Jan 16, 2003
Posts: 15
Hello,
I am trying to develope a web application using JSP or Servlets that will
1. read all email inside email account.(done in JSP)
2. summarize the total of emails, put in database (done in JSP).
Currently the administrator have to open the JSP files, click a button and
only then the process will start to put the total of emails inside database.
But I need to make these processes automated, like once every week, without administrator or anyone. How do I do that? Is using JSP and Servlets suitable for accomplishing the task above? Please help
Thanks in Advance!!!
[ September 04, 2003: Message edited by: Steven Ho ]
[ September 04, 2003: Message edited by: Steven Ho ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61202
    
  66

Doing this in the context of JSPs and servlets doesn't make a whole lot of sense. I'd write a daemon app that either runs all the time and wakes up when it's time to do something, or that's executed as a cron job on the server at scheduled times.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
The daemon could of course run as a container-lifecycle servlet which launches a single thread that once a week performs its task.
The same servlet could then also provide a means to perform administration on itself (say, set the interval or other parameters) through a web interface.


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to run JSP or Servlets in background?