Some web project using default HttpSession as GUI session(default timeout is 30 minutes), we can set the value at glassfish level
just as the blog (http://javaeyetodj.iteye.com/blog/838500) said:
1 如果在jsp中没有显式使用 < %@page session="false"%>,那么jsp编译时会加上HttpSession session = HttpServletRequest.getSession(true),这就是为什么打开一个jsp页面就建立了一个session
服务端自动创建的session对象,过期时间tomcat默认是30分钟
/cluster/home/asuser/nodes/1/domains/dve-domain/config/default-web.xml
<session-config>
<session-timeout>30</session-timeout>
just as the blog (http://javaeyetodj.iteye.com/blog/838500) said:
1 如果在jsp中没有显式使用 < %@page session="false"%>,那么jsp编译时会加上HttpSession session = HttpServletRequest.getSession(true),这就是为什么打开一个jsp页面就建立了一个session
服务端自动创建的session对象,过期时间tomcat默认是30分钟
2 servlet容器就是你所有的应用服务器(如Tomcat),服务器的主要功能就是创建和维护servlet类所需的一些实例(如 doPost(HttpServletRequest req,HttpServletResponse res)中的req和res 对象及ServletContext对象,所以当你在不同的页面会话时,就不需自己创建这些对象,只要拿到这些对象用就行了,servlet容器就创建的HttpSession对象,也就是你通过HttpSession session=res.getSession();所获取的对象。
3 在一次请求访问一个应用的时候session默认是没有的,只有遇到了 HttpServletRequest.getSession(true),这句话才建立的,所以说如果有jsp页面的话只要一访问也就有了session
if the session timeout , browser send a request with timeout session to web server,then the server will redirect to error page.
To show the session status in GUI,we can using DWR (direct web remoting) and js to fetch session. and show in GUI
To ensure the user is login,we can add the atrribute to the session, and using filter in web.xm to filter whether the session is login.
if the session timeout , browser send a request with timeout session to web server,then the server will redirect to error page.
To show the session status in GUI,we can using DWR (direct web remoting) and js to fetch session. and show in GUI
To ensure the user is login,we can add the atrribute to the session, and using filter in web.xm to filter whether the session is login.