struts错误处理

struts异常处理struts.xml配置error.jsp示例  import com.opensymphony.xwork2.ActionSupport  @Suppress

struts异常处理
struts.xml配置



error.jsp


示例
  import com.opensymphony.xwork2.ActionSupport;  @SuppressWarnings("serial")  public class Test extends ActionSupport {  @Override  public String execute() throws Exception {  // TODO 自动生成方法存根  //产生一个除数为0的异常  int i = 1/0;  return SUCCESS;  }  }