You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Neil Aggarwal <ne...@JAMMConsulting.com> on 2007/09/10 15:59:52 UTC

Error-page directive not working

Hello:

I added this error-page directive in my web.xml for an
app I am developing using Struts 2:

  <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

Any ideas how to correct this?

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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Error-page directive not working

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Neil,

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

What /do/ you get in the browser?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG5Wpj9CaO5/Lv0PARAsmqAKC3OsjqQCNf3a4456WzdiOvIi46EACfSEUV
atC4Bo3Y4PAZR2EWs5HeyR4=
=YEHG
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org