How to access Servlet Session in CXF Interceptor?
I have an "in" CXF Interceptor, I want to access the the Servlet Session in its handleMessage()
method. My开发者_Go百科 Interceptor extends AbstractPhaseInterceptor
.
I want to access the session to store some info about the user as my web service client maintains sessions.
I can already access the session in my web services.
You should be able to do
HttpServletRequest req = (HttpServletRequest)message.get("HTTP.REQUEST");
to get the HttpServletReqest where you can then grab the session from it.
精彩评论