• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

How to run JSP or Servlets in background?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Warning! Way too comfortable! Do not sit! Try reading this tiny ad instead:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic