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>

Java Servlet/JSP容器配置 session id的更多相关文章

  1. web容器 web服务器 servlet/jsp容器 之间的区别和关系是什么?

    web容器 web服务器 servlet/jsp容器 之间的区别和关系是什么? 这是我在网上找的一些资料:1. Web浏览器除了可以在本地硬盘上打开网页文档外,还可以使用http网络协议从网络上的We ...

  2. 天坑 之 java web servlet+jsp项目 配置后 404 (MyEclipse转eclipse)

    最近搞一个自己的博客系统玩,用了servlet+jsp,结果发现了两个大问题: 1.无法 Export 出 WAR文件: 2.生成WAR,放置到TOMCAT的 webapps目录后,http://lo ...

  3. Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bhive.session.id%7D_resources

    原因:环境变量设置问题 <property>    <name>Hive.exec.local.scratchdir</name>    <value> ...

  4. web容器 web服务器 servlet/jsp容器 之间的区别和关系

    今天学习tomcat时发现一篇写的比较好的文章,故分享给大家 Web服务器(软件): Apache http server, 这个它的网址,http://httpd.apache.org/downlo ...

  5. [Java]Servlet&JSP

    在这里学习Servlet和JSP >> Servlet&JSP的那些事儿 >> servlet [书籍] 孙鑫的<Servlet/JSP深入详解:基于Tomcat ...

  6. Java Servlet JSP编程(一)

    最近想学学java编程,java现在的应用还是挺广泛的,有必要学习一下. # index.jsp <%@ page language="java" contentType=& ...

  7. java servlet jsp 导入boostrap css js

    1.在导入boostrap.css的时候注意了 一定要注意路径,你知道把js和css包放在servlet服务器的静态路径下面就是 lib 文件夹路径下,直接使用 lib/js/boostrap.css ...

  8. java/servlet/jsp 中String与int相互转换

    String ---> int //方式一:Integer(String s) //demo: Integer i = int a = i.intValue() //方式二:static int ...

  9. Java Servlet XML文件配置

随机推荐

  1. VUE -- 如何快速的写出一个Vue的icon组件?

    伴随着Vue的诞生,它似乎就被人寄予厚望,不仅仅是因为其轻量级的MVVM设计方式,而且其实现了组件化开发模式,所以越来越多的人会拿Vue和AngularJS.React Native做比较.具体关于它 ...

  2. Helm安装和项目使用

    整体架构 1.为什么要用? 首先在原来项目中都是基于yaml文件来进行部署发布的,而目前项目大部分微服务化或者模块化,会分成很多个组件来部署,每个组件可能对应一个deployment.yaml,一个s ...

  3. <input type = "submit"> 提交方式和用js的form.submit()有什么区别?

    假设: A表单内有<input type="submit">,通过点击这个input来提交表单 B表单内没有<input type="submit&qu ...

  4. Ftp上传文件

    package net.util.common; import java.io.File; import java.io.FileInputStream; import java.io.FileOut ...

  5. Oracle数据迁移至HBase操作记录

    Oracle数据迁移至HBase操作记录 @(HBase) 近期需要把Oracle数据库中的十几张表T级别的数据迁移至HBase中,过程中遇到了许多苦难和疑惑,在此记录一下希望能帮到一些有同样需求的兄 ...

  6. c#跟objective-c语言特性的对比

    拿c#语言跟objective-c做个对比,记录下自己认为是差不多的东西. 学过objc的人相信对category这个东西肯定不陌生,它可以让我们在没有源码的基础上对原先的类添加额外的一些方法,写到这 ...

  7. centos/7/isos/x86_64 下载

    为了节约有限的可用带宽. 不从mirror.centos.org下载iso映像 以下镜子应该可用的ISO映像: http://mirrors.aliyun.com/centos/7/isos/x86_ ...

  8. ssh认证

    密钥认证 密码验证会造成账户口令的外泄,不安全,基于账号的保密性考虑,可以采用密钥验证实现远程连接. Linux--Linux 1.Linux客户端主机上生成密钥文件 ssh-keygen -t rs ...

  9. 云计算之路-阿里云上:启用Windows虚拟内存引发的CPU 100%故障

    今天上午11:35~11:40左右,由于负载均衡中的两台云服务器CPU占用突然飚至100%,造成网站5分钟左右不能正常访问,请大家带来了麻烦,请谅解! (上图中红色曲线表示CPU占用) 经过分析,我们 ...

  10. Unity3D入门基础之游戏对象 (GameObject) 和组件 (Component) 的关系

    原文出处:http://edu.china.unity3d.com/learning_document/getData?file=/Manual/TheGameObject-ComponentRela ...