开发者

How to access Servlet Session in CXF Interceptor?

开发者 https://www.devze.com 2023-02-04 02:48 出处:网络
I have an \"in\" CXF Interceptor, I want to access the the Servlet Session in its handleMessage() method. My开发者_Go百科 Interceptor extends AbstractPhaseInterceptor.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消