首页 技术 正文
技术 2022年11月16日
0 收藏 695 点赞 4,404 浏览 1468 个字

http://www.eclipse.org/jetty/documentation/current/session-management.html#setting-session-characteristics

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>hello-jee5</display-name>
<session-config>
<session-timeout>30</session-timeout>
<!-- Servlet 3.0规范可以使用该配置,使session id在URL中,而不是使用cookie -->
<!-- <tracking-mode>URL</tracking-mode> -->
</session-config>
<context-param>
<param-name>org.eclipse.jetty.servlet.SessionCookie</param-name>
<param-value>SID</param-value>
</context-param>
<context-param>
<param-name>org.eclipse.jetty.servlet.SessionIdPathParameterName</param-name>
<param-value>sid</param-value>
</context-param>

resin 3.1.x不支持servlet 3.0规范,不过可以在resin.conf里配置

    <session-config>
<enable-cookies>false</enable-cookies>
<enable-url-rewriting>true</enable-url-rewriting>
</session-config> <web-app id="/hello-jee5" root-directory="D:\Workspace\_EclipseKepler\hello-jee5\src\main\webapp">
<!-- configurate web directory, app.home=maven项目根目录,app.name=项目构建后的名字 -->
<prologue>
<class-loader>
<!--configurate class directory-->
<compiling-loader path="D:\Workspace\_EclipseKepler\hello-jee5\target\classes"/>
<!--configurate library directory-->
<library-loader path="D:\Workspace\_EclipseKepler\hello-jee5\target\hello-jee5-0.0.1-SNAPSHOT\WEB-INF\lib"/>
</class-loader>
</prologue>
</web-app>
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,086
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,561
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,410
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,183
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,820
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,903