You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Wendy Smoak <ja...@wendysmoak.com> on 2005/04/11 18:59:59 UTC
Wrapping a Request (was Re: Tomcat user 'roles' question)
Bill Barker wrote:
> You could use a Valve, but it sounds like for what you want, you could
> simply wrap the HttpServletRequest in your Filter with a wrapper that
> overrides isUserInRole.
Wrapping the request sounds like a good way to go, but I'm on Tomcat 4.1 and
the HttpRequestWrapper appears to be deprecated without suggesting a
replacement:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/connector/HttpRequestWrapper.html
Should I use something else?
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Wrapping a Request (was Re: Tomcat user 'roles' question)
Posted by Wendy Smoak <ja...@wendysmoak.com>.
(Apologies for the repost a minute ago... wrong button.)
From: "Wendy Smoak" <ja...@wendysmoak.com>
> Wrapping the request sounds like a good way to go, but I'm on Tomcat 4.1
and
> the HttpRequestWrapper appears to be deprecated without suggesting a
> replacement:
>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/connector/HttpRequestWrapper.html
>
> Should I use something else?
Apparently...
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/servletapi/javax/servlet/http/HttpServletRequestWrapper.html
So, in my Filter, I have:
HttpServletRequestWrapper wrappedRequest = new MyRequestWrapper(
request );
chain.doFilter( wrappedRequest, response );
and
public class MyRequestWrapper extends HttpServletRequestWrapper { ... }
Google didn't turn up any examples, so I'm feeling my way through this.
Please yell if I've gotten off on the wrong track,(otherwise I'll be back
when something stops working...)
--
Wendy Smoak
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Wrapping a Request (was Re: Tomcat user 'roles' question)
Posted by Wendy Smoak <ja...@wendysmoak.com>.
----- Original Message -----
From: "Wendy Smoak" <ja...@wendysmoak.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, April 11, 2005 9:59 AM
Subject: Wrapping a Request (was Re: Tomcat user 'roles' question)
> Bill Barker wrote:
> > You could use a Valve, but it sounds like for what you want, you could
> > simply wrap the HttpServletRequest in your Filter with a wrapper that
> > overrides isUserInRole.
>
> Wrapping the request sounds like a good way to go, but I'm on Tomcat 4.1
and
> the HttpRequestWrapper appears to be deprecated without suggesting a
> replacement:
>
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/catalina/docs/api/org/apache/catalina/connector/HttpRequestWrapper.html
>
> Should I use something else?
>
> --
> Wendy Smoak
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org