skc_ytt
Sep 14th, 2007, 01:07 AM
Hi, I amtrying to print exceptions in the error.jsp. However, I got many kinds of exceptions from the services. So, I wrote a map.propertites to manage the exceptions.
error1=DBException
error2=serveletException
error3=.....
The following is the controller, which returns error to the error.jsp page.
try{
...
}catch (Exception e) {
//e.printStackTrace();
//errors.reject(e.getMessage());
errors.reject(e.getMessage());
return new ModelAndView(ERROR, "error", errors);
the following is error.jsp file. Currently, the error.jsp displays "error1", which comes from errors. I wonder How I can replace the error1 with DBExceptions?
<td width="94%" class="confpad">
<fmt:message key='errorMsg'/>: <c:outvalue="${error}"/>
</td>
Thanks
error1=DBException
error2=serveletException
error3=.....
The following is the controller, which returns error to the error.jsp page.
try{
...
}catch (Exception e) {
//e.printStackTrace();
//errors.reject(e.getMessage());
errors.reject(e.getMessage());
return new ModelAndView(ERROR, "error", errors);
the following is error.jsp file. Currently, the error.jsp displays "error1", which comes from errors. I wonder How I can replace the error1 with DBExceptions?
<td width="94%" class="confpad">
<fmt:message key='errorMsg'/>: <c:outvalue="${error}"/>
</td>
Thanks