tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Mehrle" <>
Subject Re: Scheduled task in tomcat - how? 2
Date Tue, 17 May 2005 22:42:06 GMT
I was just thinking this: IF there would be another tomcat instance running, 
on a different port, then this one could issue the request and when called 
back the default servlet would pick up the response. Of course that's not 
what I'd like to do - wasting resources on a separate tomcat instance would 
be my very last resort...


----- Original Message ----- 
From: "Michael Mehrle" <>
To: "Tomcat Users List" <>
Sent: Tuesday, May 17, 2005 3:32 PM
Subject: Scheduled task in tomcat - how?

>I need to create an automated task in tomcat that gets launched every two 
>hours or so, does its work and then sleeps again. The task needs to send 
>some request values via a secure (https) POST to a cgi script running on an 
>outside server, then receive the response, parse it and put it into the 
>database. The response doesn't return the values as request parameters, but 
>instead simply returns records in CSV (comma separated values) format, one 
>record per line.
> So, here's what I'm pondering:
>  a.. What's the best way to create that automated (scheduled) task and run 
> it as a servlet under tomcat (5.5.9)?
>  b.. You guys might laugh, but the last time I parsed CSV as part of the 
> HTTP response was in my Perl days (looong ago) - is there some servlet 
> support for doing this, or do I need to code alll this stuff myself from 
> scratch?
>  c.. Finally, what's the best approach to 'receiving' the response? The 
> servlet issueing the request is obviously the requester, but since this is 
> running inside of tomcat, how do I route the response to that servlet? 
> Maybe I'm overthinking this, but I'm not sure how a servlet can be the 
> recipient of its own request. Hope this makes sense.
> Any input on one or more of these questions would be appreciated.
> Michael

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message