Hi in my Action-Class
I create this exception und want to write them out in my
error.jsp.
I just get the message text in the properties
but not the stacktrace!
How can you get the stacktrace to the
jsp?
Thanks a lot
try
{
int x = 3/0;
}
catch (ArithmeticException e)
{
ActionErrors errors = new ActionErrors();
errors.add("Error", new ActionError("title.error", e.getMessage()));
this.saveErrors(request,errors);
return (mapping.findForward("error"));
}
<%@ page contentType = "text/html;charset=UTF-8" language = "java"%>
<%@ taglib uri = "/WEB-INF/struts-logic.tld" prefix = "logic"%>
<%@ taglib uri = "/WEB-INF/struts-html.tld" prefix = "html"%>
<%@ taglib uri = "/WEB-INF/struts-bean.tld" prefix = "bean"%>
<%@ page import = "org.apache.struts.action.Action"%>
<%@ page import = "org.apache.struts.action.ActionErrors"%>
<logic:messagesPresent>
<table class = "error">
<html:messages id = "error">
<tr>
<td>
<ul>
<li class="error"><bean:write name = "error"/></li>
</ul>
</td>
</tr>
</html:messages>
</table>
</logic:messagesPresent>