【发布时间】:2016-09-02 03:37:38
【问题描述】:
大家好,我正在开发一个 java 网页,我有我所有的类和 xhtml 文件。 我可以创建 cookie,但在加载页面时无法检查它们。我有一个获取 cookie 的功能:
public Cookie getCookie(String name)
如果没有cookie,它会返回null,我正在尝试写
if(user.getCookie==null)
goto login.xhtml
基本上这就是我想要做的。如何将此代码嵌入到 html 文件中?
在我的注销中,我怎样才能删除所有的 cookie?
【问题讨论】:
-
你用的是哪个jsf版本?