I've just read Chuck's Chapter about Exception Handling (O'reilly Struts Book). Now I am trying to accomplish what he suggested. Unfortunately I am forced to used Struts 1.02.
return mapping.getInput(); didn't work - it gives back a String, but my Action class needs to return an ActionForward. (Struts 1.02). So I tried it that way: return mapping.findForward(mapping.getInput() ); But this neither worked. Now I am using: return mapping.findForward("error"); and in my struts-config I got a forward to the input page. This works, but the error(s) don't get thrown, it just forwards to the same page, but doesn't print the error(s). Someone with an appropiate example using Struts 1.02 or any suggestions how to solve this ? thx in advance, marcus Attached is my code: public class MyAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response){ [...] [...] [...] catch (SQLException e){ System.err.println(e); e.printStackTrace(); System.err.println("SQLState:" + e.getSQLState()); System.err.println("ErrorCode:" + e.getErrorCode()); ActionErrors errors = new ActionErrors(); if (e.getErrorCode()==1){ errors.add("SQLException", new ActionError("error.group.exists") ); } else { errors.add("SQLException", new ActionError("error.fatal.SQLException") ); } return mapping.findForward("error"); [...] [...] [...] -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>