0x00
level: 0x04
0x01
code:
try {// TOMCAT 下将原 sessionId 赋值给新 request if (request instanceof org.apache.catalina.connector.RequestFacade) { java.lang.reflect.Field field = org.apache.catalina.connector.RequestFacade.class.getDeclaredField("request"); field.setAccessible(true); org.apache.catalina.connector.Request r = (org.apache.catalina.connector.Request) field.get(request); r.setRequestedSessionCookie(true); r.setRequestedSessionId(request.getSession().getId()); } } catch (Exception e) { e.printStackTrace(); }
0x02
PS: 感觉这样子,吊爆了。这问题情况很复杂,这种方法对其他的项目不一定有效