Hi Larry,
> -----Original Message-----
> From: Larry Tambascio [mailto:[EMAIL PROTECTED]]
> Sent: 27 August 2002 22:44
> To: Cactus Users List
> Subject: Re: problem using include
>
[snip]
> >Ok. setURL() is simply a way to simulate a URL you would
> >normally get
> >when calling your application in production. All the http
> >servlet
> >request calls are wrapped by cactus to use the values
> >defined in
> >setURL(). However, when you call include() or forward(),
> >Cactus needs to
> >pass the original request object (not the wrapped one) as
> >this is a
> >requirements of all Servlet 2.2 engines. It is true that
> >Servlet 2.3+
> >engines should allow any wrapped request (as is mandated
> >by the filter
> >spec). This is currently not implemented in Cactus.
>
> Ah, I think this is tripping me up. I was hoping the
> wrapped request object would be passed along. The
> controller servlet would do it's thing, and the endXxx
> method would use the HttpUnit methods to assert the
> returned values.
>
> Since Cactus comes in 2.2 and 2.3 flavors, how difficult
> would it be to pass on that wrapped request for flavor
> 2.3?? Is it a small tweak, a big deal, or something in
> between? Any guidance would be greatly appreciated!!
>
I would have liked to do that and I thought about it yesterday. However,
I believe there is an issue. I remember that the Servlet spec is quite
ambiguous in term of what you're allowed to do when wrapping a request
and I seem to remember that you are not supposed to change the URI as it
will break in some containers. The only reason Cactus is wrapping
HttpServletRequest is for the setURL(). So I would be wary of changing
this. However, if you show me it is allowed then I'll do it :-)
That said, you have another option if you really want to pass some
information from the client side to the server side: simply add the URI
in a GET parameters instead of putting it in setURL() in beginXXX():
request.addParameter("XXXX", "/mycontroller/myaction.do");
then on the server side, do a forward to that URI. The other GET
parameters will be passed automatically.
[snip]
-Vincent
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>