Cookie没有安全标志jboss 5.1

时间:2017-04-10 13:35:00

标签: java java-ee cookies jboss jboss5.x

你好......

  I am trying to fixing Cookie without the secure flag in jboss 5.1

  <myJBossServerInstancePath>/deploy/jbossweb.sar/context.xml

 

 and also added 

     response.setHeader("SET-COOKIE", "JSESSIONID=" +  session.getId() + ";httpOnly");
response.setHeader("SET-COOKIE", "JSESSIONID=" + session.getId() + "; secure");

仍有安全标志丢失。我的项目是Jboss 5.1和java 1.6,我的错误在哪里?

enter image description here

1 个答案:

答案 0 :(得分:1)

打开{JBOSS_HOME} /server/SERVER_NAME/deploy/jbossweb.sar/contex.xml

添加<SessionCookie secure="true" httpOnly="true" />

然后重启服务器