Re: How do you catch exceptions in an Ajax a-tag call to an action
Philip Luppens <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.webwork |
|---|---|
| Message-ID | <4892416.1150179924010.JavaMail.os-j2ee@opensymphony01.managed.contegix.com> |
This should work:
myAction.java:
[code]
..
if (foo == null){
return ERROR;
}
..
[/code]
xwork.xml:
[code]
..
<result name="error">WEB-INF/jsp/error.jsp</result>
..
[/code]
And in your jsp page you can return whatever you want, including errorMessages, actionMessages, etc ..
Just make sure your error.jsp generates correct javascript (use firebug/venkman/javascript console/..).
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=34094&messageID=66408#66408
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]