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>
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.