Howdy Ranchers!
Just wondered - what do you think is the "right" choice of handling
servlet exceptions?
When in controller (servlet) an exception is raised, you are:
1. Wrapping this exception into runtime one (like ServletException) and defining appropriate error-page in DD (application-wide exception handling),
2. Setting some attribute (like "error") using request.setAttribute("error", DESCRIPTIVE_ERROR_MESSAGE) and preparing your page for showing such errors (i.e. <span class="error">${error}</span>)
Or maybe you prefer some other way?
I suppose the universal answer would be "whatever works for you", but I'm asking this question more in terms of
patterns and good habits.
Thanks in advance for your replies!
Cheers!