Java设置session超时时间

news/2024/7/23 16:21:21

一、原因

一般的情况下系统登录后,都会设置一个当前session失效的时间,以确保在用户长时间不与服务器交互的情况下自动退出登录,销毁session。

二、配置

web.xml(以分钟为单位)

<sesion-config>
      <session-timeout>120</session-timeout>
  </sesion-config>

http://www.niftyadmin.cn/n/1859184.html

相关文章

shell常用时间戳的获取和转换时间

1、获取当前日期时间 要获取当前日期时间&#xff0c;返回如1970-01-01 00:00:00则使用如下代码&#xff1a; currentTime date "%Y-%m-%d %H:%M:%S"输出2019-04-29 09:49:48 也可以使用简写&#xff1a; currentTime date "%F %T"格式可以根据需要修改…

linux环境下python的virtualenv虚拟环境与使用

一、前言 python的虚拟环境virtualenv是用于创建一个独立的python环境&#xff0c;带独立的库&#xff0c;和其他python环境完全独立互不影响&#xff0c;可以创建多个。需要在机器上先安装好一个python。 二、创建virtualenv虚拟环境 1、安装virtualenv 使用pip安装virtua…

运行web项目出现:Filter mapping specifies an unknown filter name null

一、错误信息 严重: The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: Failed to start component [StandardServer[9005]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)…

Bootstrap简单了解

一、简介 Bootstrap是一个前端框架、是目前最受欢迎、最流行的web前端框架、是Twitter公司的Mark Otto和Jacob Thornton一起开发的&#xff0c;Bootstra框架是基于HTML、CSS、JavaScript 开发的&#xff0c;它因简洁、直观、功能强大被开发者广发使用。 Bootstrap前端框架使得…

postgresql技巧之命令导出表(csv格式)

有时候我们需要导出某个表&#xff0c;但是又不能用Navicat等直接连接数据库&#xff0c;那么就可以使用COPY命令来导出表&#xff1b; 一、登录postgresql 其需要先在数据库服务器上切换账户并进入postgresql下 [rootlocalhost ~]# su - postgres Last login: Sun Apr 28 1…

利用辗转相除法来解决最大公约数问题

也可以使用最笨的办法就是短除法&#xff0c;但是如果数比较大的话效率问题就呵呵了。 package sfbc; /*** 利用辗转相除法来解决最大公余数问题* 可以用来求最简分数* author trfizeng**/ public class GCD {public static void main(String[] args) {System.out.println(doGC…

Could not find SQL statement to include with refid**

一、错误描述 二、问题原因 **mapper.xml 文件出错&#xff1a; 1、id错误 2、sql便签必须在其他便签之前 3、SQL语句写错

Web页面读不出来传过来的数据

错误 解决 查看com.online.education.common.web.UTF8HttpMessageConverter这个类是不是有问题