[jboss-user] [JBoss Seam] - Custome 404 error page display problem

lcoetzee do-not-reply at jboss.com
Thu Oct 19 05:30:11 EDT 2006


I have annotated my exception class with the @HttpError to return the 404 error code:

  | @HttpError(errorCode=HttpServletResponse.SC_NOT_FOUND)
  | public class NAPEntityNotFoundException extends Exception implements Serializable {

When I throw the exception I get redirected to the standard tomcat 404 error page. Good. 

However, ideally I would like to display my own error page. When I configure this in my web.xml:

  | 		<error-code>404</error-code>
  | 		<location>/public/error/errorPage.xhtml</location>
  | 	</error-page>
 something weird happens.

I do not get redirected to any error page, but instead my browser pops up a dialog with the following message:
anonymous wrote : The file "viewContent.jsf" is of type application/xhtml, and Mozilla does not know how to handle this file type. This file is located at: http://localhost:8080 What should Mozilla do with this file? Open it, Save it

Note that the page "viewContent.jsf" above is the page which was being displayed at the time when I threw the exception. Any suggestions as to what I can do ?



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979295#3979295

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979295

More information about the jboss-user mailing list