[jetty-dev] [jira] (JETTY-1506) error-page ignored
"Jan Bartel (JIRA)" <[email protected]>
| Newsgroups | gmane.comp.java.jetty.general |
|---|---|
| Message-ID | <851874939.62215.1333583703056.JavaMail.j2ee-jira@codehaus01.managed.contegix.com> |
[ https://jira.codehaus.org/browse/JETTY-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=295809#comment-295809 ]
Jan Bartel commented on JETTY-1506:
-----------------------------------
Nils,
I have the following in $JETTY_HOME/etc/webdefaults.xml:
{code}
<error-page>
<error-code>500</error-code>
<location>/booboo.html</location>
</error-page>
{code}
I've made sure my webapp is using the $JETTY-HOME/etc/webdefaults.xml file (which it won't do by default - it will use the one inside jetty-webapp.jar).
Then if hit the following jsp, it generates an error 500 and I see the contents of booboo.html on the browser:
{code}
<html><head>
<%@ page import="java.util.Enumeration" %>
</head><body>
<h1>ERRRR</h1>
<%
if (true)
throw new ServletException("FOO");
%>
</body></html>
{code}
After you've double-checked that you're using the correct webdefault.xml file and the problem still exists, please reply with the way you're trying to generate the error. Is it via a dispatch, for example?
thanks
Jan
> error-page ignored
> ------------------
>
> Key: JETTY-1506
> URL: https://jira.codehaus.org/browse/JETTY-1506
> Project: Jetty
> Issue Type: Bug
> Components: Hightide, Servlet
> Affects Versions: 8.1.2
> Environment: Linux
> Reporter: Nils
>
> I have webdefault.xml defined to include an error-page, like this:
> <error-page>
> <location>/error</location>
> </error-page>
> I have also tried this:
> <error-page>
> <error-code>500</error-code>
> <location>/error</location>
> </error-page>
> and this:
> <error-page>
> <exception-type>java.lang.Throwable</exception-type>
> <location>/error</location>
> </error-page>
> In all three cases, the exception stack trace is displayed in all its beauty, but not exactly what I'm looking for.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email