可能这是一个重复的问题,但是据我搜索,上面的问题与Tomcat有关。我尝试过的在web.xml中设置http-only标志的方法很少与sun one web服务器一起工作。所以请建议我如何添加http-only到JSESSIONID的web应用程序,运行在sun one web服务器上。
谢谢
该配置与web-app的版本有关,与Tomcat或webserver 6.0无关。下面的配置只能在version="3.0":
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee web-app_3_0.xsd"
version="3.0">
<!-- The configuration below is possible only in the version="3.0" -->
<session-config>
<cookie-config>
<http-only>true</http-only>
</cookie-config>
</session-config>
</web-app>