Thanks for response Charlie.

So are you saying by maybe setting up a servlet mapping in the web.xml I can
call that so a scheduling servlet is run, which
will take the task string as a parameter any any other data the task needs
and forward the request,response to the
task servlet.

Can calling the URL work by using
HttpServlet.getServletContext().getResource(http://myserver/scheduler/doTask
);, which
returns a URL object?

The point I am at when it comes to executing the servlet I don't have access
to any HttpServletRequest or HttpServletResponse so it makes it a bit
trickier.

Nathan.

----- Original Message -----
From: "Cox, Charlie" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 10:16 AM
Subject: RE: Not using the usual/ normal process, is their another way of
executing a servlet?


> why not set up a URL that your scheduler can call?
> http://myserver/scheduler/doTask <http://myserver/scheduler/doTask>
>
> This could run a servlet that would do the task. You can set up filters or
> valves to restrict access to localhost.
>
> Charlie
>
> -----Original Message-----
> From: Nathan Smith [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 20, 2002 4:06 PM
> To: Tomcat Users List
> Subject: Not using the usual/ normal process, is their another way of
> executing a servlet?
>
>
>     I have a schedule program which takes a task string being some program
> or servlet and needs to be able to run the program or task in the
background
> in it's own thread.
>
> The problem is that in this case the servlet is not being executed through
a
> browser, a jsp page, or from another servlet.
>
> I was wondering if anybody had used or tried another way of running a
> servlet. I do have an instance of the starting servlet that starts up the
> background scheduler, so I have access to that servlets methods and the
> servlet context and servlet config. I am actually trying to get the URL
> using the servlet instance.getServletContext().getResource(task); I have
no
> idea if this will work and what I can then do after I have created the URL
> object.
>
> Any ideas?
>
>
> Nathan.
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to