resin中配置session相关参数

【转】关于resin的 session 的持久化(存储) (一)  

 遇到项目菜单容易在30分钟后出现timeout页面超时,提示用户重新登录问题,已在项目配置文件web.xml中查找未发现配置timeout的相关配置。
 但用户反馈每30分钟出现此情况。
 
检查服务器配置resin.conf尚未配置session的timeout参数。在以下材料中的值如果服务器不配置则默认session-timeout为30分钟,且若服务器配置resin.conf与项目配置web.xml同时配置timeout,则服务器配置优先级最高。
 

   关于resin的session配置例子如下,session持久化的配置:

      <session-config>
            <session-max>16686</session-max>
            <session-timeout>40</session-timeout>
            <enable-cookies>true</enable-cookies>
            <enable-url-rewriting>true</enable-url-rewriting>
            <file-store>WEB-INF/sessions</file-store><!-- 存储位置-->
             <always-load-session>true</always-load-session>
     </session-config>

 

session-config的其它配置参数如下

session-config
 
AttributeMeaningDefault
session-timeoutThe session timeout in minutes30 minutes
session-maxMaximum active sessions4096
enable-cookiesEnable cookies for sessions (resin 1.1)true
enable-url-re writingEnable URL rewriting for sessions (resin 1.1)true
cookie-versionVersion of the cookie spec for sessions (resin 1.2)1.0
cookie-domainDomain for session cookies (resin 1.2)none
cookie-max-ageMax age for persistent session cookies (resin 2.0)none
cookie-lengthMaximum length of the cookie. (resin 2.1.1)Integer.MAX_VALUE
file-storePersistent sessions using a file store (resin 1.2)none
jdbc-storePersistent sessions using a JDBC store (resin 1.2)none
tcp-storePersistent sessions using a distributed ring (resin 1.2)none
always-load-sessionReload data from the store on every request (resin 1.2)false
always-save-sessionSave session data to the store on every request (resin 1.2)false
save-on-shutdownOnly save session when the application shuts down. (resin 1.2.3)false
reuse-session-idReuse the session id even if the session has timed out. (resin 2.0.4)true
ignore-serialization-errorsWhen persisting a session, ignore any values which don't implement java.io.Serializablefalse

1,第一种格式为例子中的格式

2,<session-config session-timeout='120'/><!--session-timeout  为属性-->

3,<session-config>
          <session-timeout id=120/>
          <session-max id=4096/>
       </session-config>



 

转载于:https://www.cnblogs.com/yuedanfengqing/p/4318065.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值