标签:
关于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 |
Attribute | Meaning | Default |
---|---|---|
session-timeout | The session timeout in minutes | 30 minutes |
session-max | Maximum active sessions | 4096 |
enable-cookies | Enable cookies for sessions (resin 1.1) | true |
enable-url-re writing | Enable URL rewriting for sessions (resin 1.1) | true |
cookie-version | Version of the cookie spec for sessions (resin 1.2) | 1.0 |
cookie-domain | Domain for session cookies (resin 1.2) | none |
cookie-max-age | Max age for persistent session cookies (resin 2.0) | none |
cookie-length | Maximum length of the cookie. (resin 2.1.1) | Integer.MAX_VALUE |
file-store | Persistent sessions using a file store (resin 1.2) | none |
jdbc-store | Persistent sessions using a JDBC store (resin 1.2) | none |
tcp-store | Persistent sessions using a distributed ring (resin 1.2) | none |
always-load-session | Reload data from the store on every request (resin 1.2) | false |
always-save-session | Save session data to the store on every request (resin 1.2) | false |
save-on-shutdown | Only save session when the application shuts down. (resin 1.2.3) | false |
reuse-session-id | Reuse the session id even if the session has timed out. (resin 2.0.4) | true |
ignore-serialization-errors | When persisting a session, ignore any values which don‘t implement java.io.Serializable | false |
1,第一种格式为例子中的格式
2,<session-config session-timeout=‘120‘/><!--session-timeout 为属性-->
3,<session-config>
<session-timeout id=120/>
<session-max id=4096/>
</session-config>
标签:
原文地址:http://www.cnblogs.com/yuedanfengqing/p/4318065.html