Hi Matt,

Matt Raible wrote:
In struts.xml, you can map global exceptions:

        <global-exception-mappings>
<exception-mapping exception="org.springframework.dao.DataAccessException" result="dataAccessFailure"/>
        </global-exception-mappings>

http://struts.apache.org/2.x/docs/exception-configuration.html
That looks just like what I need. I notice from the URL that you can also do specfic <exception-mapping ../> elements within your actions. That will be useful if I can't work out a way to pull the name of the entity being persisted (to create a message like "the Truck you are editing has been changed by someone else..." rather than a more generic "the record you are editing has been...") from the exception. I note from the link you provided that the exception itself is made available on the OGNL value stack, so hopefully I'll be able to find my model class lurking in there somewhere.

Now all I have to do is get back to working out why I'm getting these dang errors when I'm the only one editing the record :-(

Many thanks,
Rob Hills
Waikiki, Western Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to