You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jan Bols <ja...@ivpv.ugent.be> on 2005/08/05 10:46:50 UTC
setting errorPage doesn't work
I have a very simple page like this:
//
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ page errorPage="/error.jsp" %>
<f:view>
<h:form>
<h:commandButton action="#{test.save}"></h:commandButton>
</h:form>
</f:view>
//
The test.save() action throws an exception and the error.jsp page is just
an ordinary jsp page.
When I run this and push on the submit button of the jsf page I don't get
the error.jsp page but the default tomcat error page containing the
following:
//
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
javax.servlet.ServletException: Expression: #{test.save}
javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
root cause
javax.faces.el.EvaluationException: Expression: #{test.save}
org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:145)
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:62)
javax.faces.component.UICommand.broadcast(UICommand.java:106)
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:87)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:161)
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:270)
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)
//
Why does setting <%@ page errorPage="/error.jsp" %> not work? When I set
the error page in the web.xml file it does work.
I'm using the nightly build version of myfaces.
greetings
Jan