struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Lea <ja...@kumachan.net.nz>
Subject Re: <error-page> not catching errors...
Date Thu, 26 May 2005 22:05:15 GMT
Have you tried testing in Firefox to see if you get the same result.

Internet Explorer may be confusing the issue:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807

"Several frequently-seen status codes have "friendly" error messages 
that Internet Explorer 5./x/ displays and that effectively mask the 
actual text message that the server sends. However, these "friendly" 
error messages are only displayed if the response that is sent to the 
client is less than a specified threshold. *For example, to see the 
exact text of an HTTP 500 response, the content length must be greater 
than or equal to 512 bytes. *"

So you might have to pad out your response with commented html or 
something for the message to show.

David Johnson wrote:

>Hi all
> I've added the following to my web.xml (thanks for the help)
>  
><error-page>
><error-code>500</error-code>
><location>/error.jsp</location>
></error-page>
><error-page>
><error-code>404</error-code>
><location>/error.jsp</location>
></error-page>
><error-page>
><error-code>java.lang.Exception</error-code>
><location>/error.jsp</location>
></error-page>
>
>and I've added a global forward I invoke from "error.jsp" which points to my 
>tiles def as follows
>
><forward name="error" path="/page.error" />
>
>the problem is when I cause an error (like stopping the database then trying 
>to hit it or reloading a page that should cause an error 500), I'm not 
>seeing my error page.
>
>am I forgetting something?
>
>
>  
>

-- 
Jason Lea



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message