users@jersey.java.net

HttpServletRequest.getAttributes

From: John Calcote <john.calcote_at_gmail.com>
Date: Thu, 09 Sep 2010 16:47:02 -0600

 Hi all -

Is there any way, from within a Jersey resource handler, to get at the
attributes of the underlying HttpServletRequest object?

I'm working on a system that has an extremely tight set of container
constraints. I can't modify things the way I'd be able to if I were
writing a servlet for a dedicated servlet container. As it is, I'm in a
jetty container that's controlled by another application and I can't go
adding code to the server.xml file to enable various authentication
schemes etc. Thus, I can't turn on certificate authentication at the
container level. The best I can do is try to read the
|"javax.servlet.request.X509Certificate"| attribute from the
HttpServletRequest object's attribute list, then detect the various
certificate attributes and authenticate the client from within my servlet.

Thanks in advance,
John