tomcat6需手动配置,conf/context.xml
<Context useHttpOnly="true"> </Context>
对于tomcat7、8来说不需要手动配置,useHttpOnly选项默认为true。