jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Wilkins <gr...@mortbay.com>
Subject Re: [jetty-support] Cactus and Jetty problem
Date Fri, 21 Jun 2002 11:52:18 GMT

Scott,

The JavaDoc of RequestDispatcher clearly

      * <p>The request and response parameters must be either the same
      * objects as were passed to the calling servlet's service method or be
      * subclasses of the {@link ServletRequestWrapper} or
      * {@link ServletResponseWrapper} classes that wrap them.

Thus Jetty expects to be able to unwrap the passed req/response objects
to get to the originals.

If the cactus folks have a REALLY good reason why they are doing it
this way, we could probably change our next release (4.1.x) to not enforce
this.  However the current stable release 4.0.x will not be able to
be changed to not enforce this.

cheers



Scott Sayles wrote:
> Hello.
> 
> Sorry for the cross-post, but I think this is appropriate for either
> list.
> 
> I'm currently implementing a JSP web application that I intend to deploy
> in JBoss 3.0.0.  I've been writing unit tests with Cactus and am running
> into some problems with Jetty (or Cactus, depending upon how you look at
> it :-p).
> 
> The tests send a request to a url that in turn is mapped to a Struts
> action which ends up forwarding the request.  These tests work fine with
> Tomcat, but when it's run against Jetty I get the following error:
> 
> ------- From the test report --------
> Error: Does not wrap ServletHttpRequest
> 
> java.lang.IllegalArgumentException: Does not wrap ServletHttpRequest
> at
> org.mortbay.jetty.servlet.ServletHttpRequest.unwrap(ServletHttpRequest.java:859)
> at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:182)
> at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:156)
> at
> org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:972)
> at
> org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:408)
> at 
> (... cut ...)
> --------------------------------------
> 
> Apparently, Cactus is using some kind of ServletHttpRequest that Jetty
> does not like when it tries to do a forward.
> 
> hmm....  so this just seems like a change that needs to occur with
> Cactus or Jetty.  Is this a known issue?  I haven't been able to find a
> lot of messages related to this, except for the following:
> 
> http://groups.yahoo.com/group/jetty-support/message/2987
> 
> 
> Thanks.
> 
> Scott
> 
> 
> ------------------------ Yahoo! Groups Sponsor ---------------------~-->
> Free $5 Love Reading
> Risk Free!
> http://us.click.yahoo.com/3PCXaC/PfREAA/Ey.GAA/CefplB/TM
> ---------------------------------------------------------------------~->
> 
> For the latest information about Jetty, please see http://jetty.mortbay.org
> 
>  
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 


-- 
Greg Wilkins<gregw@mortbay.com>          GB  Phone: +44-(0)7092063462
Mort Bay Consulting Australia and UK.    Mbl Phone: +61-(0)4 17786631
http://www.mortbay.com                   AU  Phone: +61-(0)2 98107029


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message