Your facade has to extend (Http)ServletRequestWrapper from the standard 
servlet-api.  According to the spec, that is the only valid way to wrap a 
request.  As you've seen, Tomcat enforces this restriction :).

"George Baxter" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
Hello,

For various and sundry reasons, I need to wrap the original
HttpServletRequest with a facade of my own.  I know that the
HttpServletRequest exposed by Catalina is a RequestFacade object.  I simply
wrap my facade around this puppy.

And... when my jsp attempts to render... boom:

java.lang.ClassCastException: com.xxx.request.MyTestRequestFacade
at 
org.apache.catalina.core.ApplicationDispatcher.unwrapRequest(ApplicationDispatcher.java:814)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:401)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

I tried to extend the RequestFacade, but cannot because the constructor
requires a org.apache.catalina.connector.Request, and I cannot get a hold of
that.  Is there anything I can do to encourage tomcat to instantiate my
request facade instead its own?

Using Tomcat 5.5 at present.

Thanks,




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to