This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes What is the best way to handle errors in Struts2 actions via Ajax request?.. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "What is the best way to handle errors in Struts2 actions via Ajax request?.." Watch "What is the best way to handle errors in Struts2 actions via Ajax request?.." New topic
Author

What is the best way to handle errors in Struts2 actions via Ajax request?..

Mick Smith
Greenhorn

Joined: Dec 10, 2009
Posts: 14
Not sure how to impelment this but I am doing as follows:

setting an error in my action when an error occurs along with a specific message in the HttpServletRequest however only the code is returned and not my specific message.



anyone know why my error message is not being displayed? The 900 code is displayed as an error in the response but not the message! Do I need to add my error code/message somewhere else so that server can pick it up?


Is there a better solution with deadling with errors when the call to a struts action class is an ajax one?

Cheers
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: What is the best way to handle errors in Struts2 actions via Ajax request?..
 
Similar Threads
Console doesnot starts in WAS 4.0
Empty Error Messages <h:messages/>
How to create a central error page
Exception Handlers for specific errors in Javascript
Struts 2 + Ajax response handling