zoukankan      html  css  js  c++  java
  • java web.xml session 配置

        <web-app>
    <session-config>
            <session-timeout>120</session-timeout>
            <cookie-config>
                <name>lycyjcpt-session</name>
                <http-only>true</http-only>
                <secure>false</secure>
                <max-age>1800</max-age>
            </cookie-config>
        </session-config>
    </web-app>

     一般用上面的就可以了。

    下面是详细配置

    <session-config>
        <session-timeout>30</session-timeout>
        <cookie-config>
            <name>JSESSIONID</name>
            <domain>example.org</domain>
            <path>/shop</path>
            <comment>
                <!-- some information -->
            </comment>
            <http-only>true</http-only>
            <secure>false</secure>
            <max-age>1800</max-age>
        </cookie-config>
        <tracking-mode>COOKIE</tracking-mode>
        <tracking-mode>URL</tracking-mode>
        <tracking-mode>SSL</tracking-mode>
    </session-config>
  • 相关阅读:
    golang recover
    golang sort
    golang matrix
    golang encoding/json
    go package的理解
    golang beego cache
    git操作
    阿里云图标使用
    Stylus的使用
    vue-preview的使用
  • 原文地址:https://www.cnblogs.com/whm-blog/p/11056788.html
Copyright © 2011-2022 走看看