【发布时间】:2018-02-19 17:15:33
【问题描述】:
我正在尝试设置一个将 httponly 和安全标志设置为 true 的应用程序,但只要我通过添加请求的 cookie-config 标记来编辑我的 web.xml 文件,如下所示:
<cookie-config>
<http-only>true</http-only>
<secure>true</secure>
</cookie-config>
我在提交的第一个命令链接时收到 ViewExpiredException。
我的 web.xml 文件中完整的 session-config 标记是
<session-config>
<session-timeout>5</session-timeout>
<cookie-config>
<secure>true</secure>
<http-only>true</http-only>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
我一直试图了解错误可能是什么,但找不到任何东西。
当命令链接通过 ajax 调用 bean 中的方法时,我的托管 bean 被注释为 @SessionScoped。
【问题讨论】: