- From: Benoit Mahe <Benoit.Mahe@sophia.inria.fr>
- Date: Tue, 07 Sep 1999 10:31:32 +0200
- To: Jeff Van Epps <lordbah@lordbah.com>
- CC: Jigsaw Mailing List <www-jigsaw@w3.org>
Actually, you should use the method getAttribute in HttpServletRequest (which is a
JigsawHttpServletRequest in Jigsaw).
Here is the getAttribute method:
public Object getAttribute(String name) {
return request.getState(name);
}
So you can see that getAttribute is exactly like request.getState().
Regards, Benoit.
Jeff Van Epps wrote:
> I see examples in the archives of getting the authenticated user
>
> user = (String) request.getState(AuthFilter.STATE_AUTHUSER)
>
> This assumes that you have an org.w3c.jigsaw.http.Request object to call
> getState() on. In the servlet, I don't have one, I have only the
> javax.servlet.http.HttpServletRequest. How do I get from servlet-land to
> Jigsaw-land?
>
> I see two possibilities. One is to get the context
>
> JigsawServletContext ctxt = (JigsawServletContext) getContext()
>
> but I can't see where to go next from there. Does anything lead towards that
> Request object?
>
> The other possibility is that my servlet's doGet() is actually receiving a
> JigsawHttpServletRequest instead of a HttpServletRequest. This looks good in
> that JigsawHttpServletRequest actually has a getRequest() method which I
> think
> would give me the Request I need - but that getRequest() method is protected
> so I can't invoke it!
>
> So am I looking in totally the wrong place?
>
> --
> Jeff Van Epps lordbah@lordbah.com
> Live Music In Rochester http://www.lordbah.com:8001/pub/musicmain.html
--
- Benoît Mahé -------------------------------------------------------
World Wide Web Consortium (W3C)
Architecture domain - Jigsaw Engineer
http://www.w3.org/People/Mahe - bmahe@w3.org
---------------------------------------------------------------------
Received on Tuesday, 7 September 1999 04:32:56 UTC