tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim, Greg" <gr...@Corio.com>
Subject RE: calling another "local" servlet within a servlet?
Date Wed, 24 May 2000 20:43:36 GMT
>> If servletX does not create any response, why is it a servlet?  
I want to run servletX in a separate JVM and running it as a servlet
seems like
a convenient way to do that since it is itself invoked by one.

Greg
-----Original Message-----
From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
Sent: Wednesday, May 24, 2000 2:08 PM
To: tomcat-user@jakarta.apache.org
Subject: Re: calling another "local" servlet within a servlet?


"Kim, Greg" wrote:

> I'm trying to call another servletX from servletY.  Both servlets
reside
> on the same machine.  I've tried the RequestDispatcher.forward(...),
but
> this
> method requires that it is called before the reponse has been
committed
> to the
> client (before reponse body output has been flushed).
>
> My servletY does BOTH the processing of a request and also generates a
> reponse
> (client gets a message - client is done), then servletY calls servletX
> to do some
> server side processing and it does not repond to any client.  It just
> needs the
> request.   Is there an API to accomplish what I want to do?
>

If servletX does not create any response, why is it a servlet?  Just
make it
an ordinary class with a method that accepts an HttpServletRequest as an
argument, and call it in the usual way.

>
> thanks
> Greg
>

Craig McClanahan



------------------------------------------------------------------------
--
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message