tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Replaceing RequestFacade
Date Wed, 10 Sep 2008 00:53:04 GMT
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" <gbaxter@shutterfly.com> wrote in message 
news:C4EC4567.4599%gbaxter@shutterfly.com...
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message