struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Aggarwal" <n...@JAMMConsulting.com>
Subject [S2] error-page directive not working
Date Sun, 02 Sep 2007 21:06:21 GMT
Hello:

I added this error-page directive in my web.xml:

  <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error.action</location>
  </error-page>

The error.action exists and loads correctly:
http://cbsweb.jammconsulting.com/cbsweb/error.action

I then created a jsp which throws an exception:
<%throw new Exception("Testing error handling");%>

Which I linked to this url:
http://cbsweb.jammconsulting.com/cbsweb/createError.action

When I load that url, I get an error in the tomcat log
but the error page does not come up on the browser.

Any ideas what went wrong?

Here is the output in catalina.out:

Sep 2, 2007 4:04:58 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.Exception: Testing error handling
        at
org.apache.jsp.createError_jsp._jspService(createError_jsp.java:54)
	// Rest of trace removed

Thanks,
	Neil

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message