I wonder if anyone could help me out with the following situation.

I want to have more than one servlet cooperate in processing a request. For
example, say a user requests

http://www.foo.com/gateway/prog?k=12345266&bar=baz+boop with possibly some
other parameters in the body of the request

then I want a servlet to handle this request. What this involves is working
out from the value of k what page is wanted. I then want the url rewritten
so that jsp gets a chance to handle it, something like

http://www.foo.com/docs/test.jsp?k=12345266&bar=baz+boop with possibly some
other parameters in the body of the request

I believe I can do this with an external redirect but that will convert the
request into a GET so that's not really what I want. From looking at the
mod_jserv code it doesn't seem to handle a response code of 200 with a
location header the same way mod_cgi does, i.e. it does not do an internal
redirect. It looks possible to modify mod_jserv to do an internal redirect
but I've not looked hard enough to see if it would work. Also, when mod_cgi
does an internal redirect it throws away the message body (by setting
content length to zero) and I may need that later.

Is it possible to have one servlet call another, as this would solve my
problem? What I'd then do is have the one invoked directly by mod_jserv
perform its manipulations and then call the jsp serlvet.

Anyway, anyone have any thoughts about how to do this? A sort of mod_rewrite
with processing of the request happening at each step, but with output only
produced by the last setp. Perhaps servlet chaning would help but I don't
think that's supported by mod_jserv (I could switch to Jrun etc. but don't
want to unless I have to).

Thanks
Alex




----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://www.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to