You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Mehrle <mi...@datasaur.com> on 2005/05/18 00:42:06 UTC
Re: Scheduled task in tomcat - how? 2
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...
Michael
----- Original Message -----
From: "Michael Mehrle" <mi...@datasaur.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org