For ServletException, configure the error page in web.xml file. 
it will work.

navjot


|-----Original Message-----
|From: Mohd Amin Mohd Din [mailto:[EMAIL PROTECTED]
|Sent: Sunday, August 31, 2003 5:12 PM
|To: [EMAIL PROTECTED]
|Subject: Handling Exceptions
|
|
|Hi,
| 
|In struts-config, I have defined few global-exceptions such as these
| 
|      <exception type="com.enc.edu.pg.bo.common.DataAccessException"
|                 key="exception.common.dataaccessexception"
|                 path="/action/main/dataAccessExceptionSetup"
|                 scope="session">
|      </exception>
|      <exception type="java.lang.Exception"
|                 key="exception.common.exception"
|                 path="/action/main/errorSetup"
|                 scope="session">
|      </exception>     
|      <exception type="javax.servlet.ServletException"
|                 key="exception.common.servletexception"
|                 path="/action/main/errorSetup"
|                 scope="session">
|      </exception> 
| 
|I also have created an error page, error.jsp with <%@ page
|isErrorPage="true" %> and at the top of the jsp template for all the
|pages a <%@ page errorPage="error.jsp" %>. However, when a
|ServletException occurs, it does not go to the path defined in
|struts-config.xml. Somehow, the error is still showing in the
|application page and not in any one of the error pages defined.
| 
|Thanks
|Amin 
| 
| 
|

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to