- protected void configureSessionCookie(Cookie cookie) {
- cookie.setMaxAge(-1);
- String contextPath = null;
- if (!connector.getEmptySessionPath() && (getContext() != null)) {
- contextPath = getContext().getEncodedPath();
- }
- if ((contextPath != null) && (contextPath.length() > 0)) {
- cookie.setPath(contextPath);
- } else {
- cookie.setPath("/");
- }
- cookie.setDomain("xxx.com");
- if (isSecure()) {
- cookie.setSecure(true);
- }
- }
- ...
jsp 二级域名共享session
最新推荐文章于 2021-04-07 02:57:24 发布