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

Hope this helps,

Matt

On Dec 17, 2007, at 9:34 PM, Rob Hills wrote:

Hi All,

I'm currently grappling with a weird Hibernate concurrency problem and it occurred to me that in the event that a user of my app runs into a "real" concurrency problem (where two users are actually editing the same record at the same time), s/he will be presented with a rather unfriendly error message.

I've hunted around, but not been able to find how to customise these messages, short of doing a try+catch in my DAO and second- guessing which exceptions might come up. Is there an easier way to specify user-friendly error messages, for example for the StaleObjectStateException?

Cheers,

Rob Hills
Waikiki, Western Australia

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


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

Reply via email to