struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Addagalla" <>
Subject RE: Declarative Exception Handling
Date Sun, 12 Jan 2003 11:50:22 GMT

I still need some more help in this respect. If any of you have managed
to extract messages from exception objects using declarative exception
handling, please give me some inputs.

I have tried putting the following in my jsp.

<logic:present name="<%=Action.EXCEPTION_KEY%>">
<html:errors name="<%=Action.EXCEPTION_KEY%>" property="message"/>

My action throws the InvalidLoginException and sets the "message"
attribute to some text.

I got the following error.

org.apache.jasper.JasperException: Cannot process ActionErrors instance
of class ss.prwp.service.InvalidLoginException

I have the following exceptin declared in struts-config.xml:

<exception type="ss.prwp.service.InvalidLoginException"
key="error.invalid.login" path="login.jsp" />


>-----Original Message-----
>From: Manomohan K Kalathil [] 
>Sent: Saturday, January 11, 2003 2:17 PM
>To: Struts Users Mailing List
>Subject: RE: Declarative Exception Handling
>Hi Suresh, 
>	The default exception handler within struts stores a  reference
to the exception object within the request under the key
Action.EXCEPTION_KEY. You should be able to get the object reference
using Exception cause = (Exception)
request.getAttribute(Action.EXCEPTION_KEY) within your JSP Page. 
>PS: Use only text mails when you send mails to the mailing list. Not
all of us have HTML mail clients :-)
>-----Original Message-----
>From: Suresh Addagalla []
>Sent: Friday, January 10, 2003 5:06 PM
>Subject: Declarative Exception Handling
>If I am using Declarative exception handling, is it possible 
>to extract some information from the exception object and display the
same on 
>the browser? Or is it that I need to use programmatic exception
handling if I have such

View raw message