On Tue, 23 Jul 2002, John Rishea wrote:

> Date: Tue, 23 Jul 2002 10:09:50 -0600
> From: John Rishea <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: RE: Help with chaining servlets via filters
>
> Craig,
>
> I have one servlet that runs a unix script using runtime exec to create an
> output file, then a follow-up servlet that takes the output file and
> displays it to a browser window.  The servlets work fine separately but
> don't work when combined into a single servlet.  So I was looking for a way
> to call the display servlet immediately after the script-running servlet
> does its thing.
>
> Any constructive suggestions would be appreciated.

Why can't you just modify the servlet that runs the unix script to copy
the output back to the client after the script executes?

If the second servlet needs to perform modifications in the output format
(such as converting static text into HTML, or performing an XSLT
transformation on an XML file), that's the kind of things that a Filter is
for.  Search Google and java.sun.com for "filter" and you'll find lots of
tutorials, resources, and examples of how to build such a thing.

> __________________
> John Rishea

Craig


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

Reply via email to