JSF commandLink 在重定向错误页面上不起作用
我将所有异常重定向到一个简单的错误页面,并在 web.xml 文件中包含以下条目:
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.xhtml</location>
</error-page>
我的错误页面包含:
<ice:form id="errorForm">
<ice:outputText value="#{guiProps.UnknownError}"/><br/><br/>
Click <ice:outputLink value="/"> here</ice:outputLink> to attempt to return to the previous page.<br/>
Click <ice:commandLink value=" here" action="#{UserBean.logoutAction}"/> if you are unable to do so.
</ice:form>
问题是,commandLink 在单击时不起作用。 logoutAction 方法永远不会被触发。你会看到一个短暂的沙漏,我观察到一点 XMR 动作(通过 Chrome 浏览器),但什么也没发生。我也尝试过使用普通的 JSF 标签(h:commandLink、h:form 等),同样的事情发生了,所以它是一个 JSF 问题,而不是 ICEfaces 问题
也很奇怪......这个问题只发生在使用 Glassfish v2.1.1 时,不是 v2.1。我不知道这本身是否是 v2.1.1 错误,但无论如何,如果有办法解决它或弄清楚发生了什么,我将不胜感激,因为我们当然正在使用 v2.1.1。
I'm redirecting all exceptions to a simple error page with the following entry in my web.xml file:
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.xhtml</location>
</error-page>
My error page contains:
<ice:form id="errorForm">
<ice:outputText value="#{guiProps.UnknownError}"/><br/><br/>
Click <ice:outputLink value="/"> here</ice:outputLink> to attempt to return to the previous page.<br/>
Click <ice:commandLink value=" here" action="#{UserBean.logoutAction}"/> if you are unable to do so.
</ice:form>
The problem is, the commandLink DOES NOT work when it's clicked. The logoutAction method is never fired. You get a brief hourglass, I observe a little bit of XMR action (via Chrome browser) but nothing really happens. I've also tried using vanilla JSF tags (h:commandLink, h:form, etc) and the same thing happens, so its a JSF problem, not an ICEfaces problem
Also weird...this problem only happens using Glassfish v2.1.1, not v2.1. I don't know if it's a v2.1.1 bug, per se, but in any case, if there is a way to work around it or a way of figuring out what is going on, I'd appreciate any help, because we are certainly using v2.1.1.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定它应该是
UserBean
而不是userBean
吗?Are you sure it is supposed to be
UserBean
and notuserBean
?