users@jersey.java.net

Communicating with Jersey from servlet filter

From: Rod Fitzsimmons Frey <rfrey_at_attassa.com>
Date: Tue, 2 Dec 2008 07:33:58 -0700

I'm having a lot of trouble creating a custom realm in Glassfish, which I'm
trying to work through on the Glassfish list.

 

To keep moving forward, I've implemented a servlet filter to do
authentication.

 

However, I'm unclear on the best way to communicate with my Resource classes
from the servlet container. Back in the day, I'd stuff an object (in this
case the authenticated user) into the HttpServletRequest using setAttribute,
or if it was long lived into the session. Obviously restful objects don't
have a session concept since they're stateless, but I'd still like to
communicate with the resources from the filter.

 

Am I misunderstanding a basic architectural aspect of jersey?

 

Thanks,

Rod