I am developing an application using JSF2, Primefaces and Hibernate. I have lot of Ajax calls. Can any one advice me how to handle the situation when there is any run time exception like null pointer exceptions, array index out of bound exceptions...?
And also I have a problem to make generic exception handling. Can any body give example for this?
Probably have to trap these exceptions in your servlet's and send a response back that tells the ajax call it's an exception. I imagine you could be as generic or a specific as you'd like with your exception-response.
Otherwise, ajax calls don't have a way to differentiate between successful responses and erroneous responses.
IMO jQuery has a good ajax api. Works well for this scenario.
Joined: Dec 17, 2009
Thanks for your response. What is that IMO jQuery? I googled for it I couldn't find any information about IMO jQuery.
Joined: Feb 09, 2006