struts-user mailing list archives

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

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"/>
</logic:present>

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" />

Thanks,
Suresh


>-----Original Message-----
>From: Manomohan K Kalathil [mailto:manmohankk@mindtree.com] 
>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. 
>Regards
>Mano
>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 [mailto:suresh.addagalla@wipro.com]
>Sent: Friday, January 10, 2003 5:06 PM
>To: struts-user@jakarta.apache.org
>Subject: Declarative Exception Handling
>
>Hi,
>
>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
>requirements?
>
>Thanks,
>Suresh


Mime
View raw message