部署两个应用在不同的Tomcat下,一个是Tomcat5.0和Tomcat6.0,
现在要求通过一个应用单点登录到另一个应用中,Session中的用户信息如何保存起来
HttpServletRequest request = Utils.getRequest();
String sessionKey = General.getSystemParameter(request.getClass(), "SESSION_KEY_USERINFO");
Object obj = Utils.getRequest().getSession().getAttribute(sessionKey);
现在要求通过一个应用单点登录到另一个应用中,Session中的用户信息如何保存起来
HttpServletRequest request = Utils.getRequest();
String sessionKey = General.getSystemParameter(request.getClass(), "SESSION_KEY_USERINFO");
Object obj = Utils.getRequest().getSession().getAttribute(sessionKey);
搞一个filter,这个filter读cookie,读到了有cookie信息就往session中存一个user信息不就好了嘛
Cookie c = new Cookie(key,value);
response.addCookie(c);