[英]How do I get rid of tomcat default session id?
I am using tomcat 6.0.14, which does not support configuration for cookies. 我正在使用tomcat 6.0.14,它不支持cookie的配置。
So I have couple of pages in my app: 所以我的应用程序中有几个页面:
app.com/login.jsp<br>
app.com/dasboard.htm
The problem is that when user is at login.jsp
, I see JSESSIONID
as a cookie. 问题是,当用户位于login.jsp
,我将JSESSIONID
视为cookie。 I want to see session cookies only post logon when I am at dashboard - How do I make this happen? 我想看到会话Cookie仅在我在仪表板时才发布登录-如何实现此目的?
By default every JSP creates new HTTP session (which is not the case for user servlets). 默认情况下,每个JSP都会创建新的HTTP会话(用户servlet并非如此)。 Add this on top of your login.jsp
to avoid eager session creation: 将此添加到您的login.jsp
顶部,以避免急于创建会话:
<%@ page session="false" %>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.