• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cron for JSP ?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JSP page which does a bunch of DB updates, and I tried setting up a Crontab to access this page on a daily basis, so the DB gets updated daily.

I receive a bunch of errors... and I'm assuming that I'm not able to run a Crontab on a JSP file, but only a Servlet (as there is no HTTP session for the JSP)
Is this assumption correct ?

If so, what are the alternatives. I could assume that I could either:
1) Do a WGET in my cron to access the JSP page.
2) Implement the DB update in a Servlet.

Any ideas / input would be greatly appreciated
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First thing to say is a JSP and a Servlet are identical.
2nd thing is how are you calling the JSP ? With "java yourJSP" ??
This won't work, cause a JSP has no main method.

I would do a WGET on the JSP then it should work.
 
reply
    Bookmark Topic Watch Topic
  • New Topic