struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lichota <>
Subject Sending email on uncought exception problems
Date Tue, 26 Nov 2013 12:44:35 GMT

I'd like to run some java code on any uncought exception but so far I
cannot find a solution.
Under this link I found the exactly same question but I do not know how to
apply solution.

Namely if I have
<s:if test="notifyAdmin(exception)"></s:if>
then in which class this method should be? Error.jsp is not associated with
any action. The author says he has this method in any Action class but for
me it doesn't work (how could it work anyway? how error.jsp know about any
Action class?

I tried also s:action element like that:
<s:action name="default-error!notifyAdmin" executeResult="false">
 and having java class with method like that:
public boolean notifyAdmin(Exception exception)

but it fails with no error message so I even do not know what is happening
(by failing I mean nothing is invoked when rendering the error page)

I also found this but it
looks like exception handler was removed in struts 2.0

Can you offer any hint?


Notice:  This email is confidential and may contain copyright material of 
Ocado Limited (the "Company"). Opinions and views expressed in this message 
may not necessarily reflect the opinions and views of the Company.

If you are not the intended recipient, please notify us immediately and 
delete all copies of this message. Please note that it is your 
responsibility to scan this message for viruses.

Company reg. no. 3875000.

Ocado Limited
Titan Court
3 Bishops Square
Hatfield Business Park
AL10 9NE

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message