天天看點

web server tomcat 7設定 cookie httpOnly

在網絡上找到的攔截器等,沒有達到效果,tomcat7可以通其配置來設定

1、修改tomcat/conf/context.xml

<Context useHttpOnly="true"></context>

2、修改tomcat/conf/web.xml

<session-config>
    <cookie-config>
        <http-only>true</http-only>
    </cookie-config></span>
</session-config>
           

3、修改tomcat/conf/server.xml

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" secure="true" />

注:個人驗證,設定第三步就可行。

若有凝問或錯誤,請指出,我好及時改正,讓我們一起進步!

email : [email protected]

qq : 103 586 2795

敲門磚: 代碼譜寫人生