1 Reply Latest reply on Mar 28, 2007 2:10 PM by antoine_h

    Handle HTTP errors or Exceptions gracefully

    engela

      I quite like to configure my portal or my portlets to go to an error page if an exception or Http Error is thrown. To so I have added the usual error page elements to the web.xml of my portlet as well as to the web.xml file in jboss-portal.sar/portal-server.war/WEB-INF:

      <error-page>
       <error-code>500</error-code>
       <location>/error.jsp</location>
      </error-page>
       :
       :
      <error-page>
       <exception-type>javax.portlet.PortletException</exception-type>
       <location>/error.jsp</location>
      </error-page>


      There is a error.jsp in the root of my portlet as well as in jboss-portal.sar/portal-server.war diretory. Despite this the generic "HTTP Status 500" error page generated by Tomcat is displayed when my portlet throws a PortletException.

      Does anyone know how to configure the portal or a portlet to display a specified error page if a HTTP error or Exception is thrown.

      Thanks,

      Anette

        • 1. Re: Handle HTTP errors or Exceptions gracefully
          antoine_h

          I am planning to do the same soon, but have not yet looked at this.

          May be look at the tomcat root server :
          \deploy\jbossweb-tomcat55.sar\ROOT.war

          I think it's this one that handle the request first, and when a resource is not found (ie: before the portal servlet that are in the portal-server.war)

          It is configured as a JMX service
          Looking at JBoss AS forum and wiki may help... probably yet answered there...

          (please consider putting the answer in this forum, when you have it... thanks)