2 Replies Latest reply on Dec 13, 2007 10:47 AM by poisoner

    How to show error page in a portlet

    poisoner

      How to show error page when exception is trown in the managed bean action or constructor?
      I tried with <error-page> in web.xml, but it doesn't work.

        • 1. Re: How to show error page in a portlet
          antoine_h

          you have to catch the exception in the action or render method of the portlet, then produce the error page instead of the content of the portlet.

          look at the cms portlet, as an example of how it is managing the "document not found" error.

          that is for having the error inside the portlet, for an error that occured inside the portlet processing.

          for the general portal error, it is the same as for any JBoss (or Tomcat) web application.
          the configuration of tomcat for the portal is in the portal-server.war.
          look in this (as you don't mention "which" web.xml you have put your <error-page>

          • 2. Re: How to show error page in a portlet
            poisoner

            How I will produce error page from bean constructor? How to redirect to other page from constructor?

            I dont want a general portal error, I want portlet error.

            I used the portlet web.xml.