zoukankan      html  css  js  c++  java
  • Java Servlet/JSP容器配置 session id

    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\_EclipseKeplerhello-jee5srcmainwebapp">
                <!-- configurate web directory, app.home=maven项目根目录,app.name=项目构建后的名字 -->
                <prologue>
                    <class-loader>
                        <!--configurate class directory-->
                        <compiling-loader path="D:Workspace\_EclipseKeplerhello-jee5	argetclasses"/> 
                        <!--configurate library directory-->
                        <library-loader path="D:Workspace\_EclipseKeplerhello-jee5	argethello-jee5-0.0.1-SNAPSHOTWEB-INFlib"/>
                    </class-loader>
                </prologue>
            </web-app>
  • 相关阅读:
    2019高考数学理科Ⅱ卷解析版[解答题]
    对风说爱你
    佛教人生-伴侣
    【Echarts每天一例】-1
    算法中涉及的专业英语
    python--随机函数(random,uniform,randint,randrange,shuffle,sample)
    【linux shell系列--1】crontab命令
    【Python爬虫实战--3】html写正则表达式
    mysql启动参数 skip-grant-tables
    php通过反射执行某方法
  • 原文地址:https://www.cnblogs.com/wucg/p/3951614.html
Copyright © 2011-2022 走看看