Exception handling Struts2异常处理

Exception handling Struts2异常处理,exception-handling,struts2,Exception Handling,Struts2,如何为过程中发生的每个错误设置单个错误页 在Struts2中执行。我的错误页面如下 error.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib prefix="s" uri="/struts-tags"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTM

如何为过程中发生的每个错误设置单个错误页 在Struts2中执行。我的错误页面如下

error.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>HOME</title>
</head>
<body>
<center>
<h2 style="color: red;">Error Occurred during processing your Request...!!!!</h2>
</center>
<hr/>
</body>
</html>

家
处理您的请求时出错。。。!!!!


您需要全局异常配置。看看它给出了以下错误org.xml.sax.saxpasseeption:元素类型“struts”的内容必须匹配(package | include | bean | constant)*“您从哪里得到这个异常。它与xml文件中的语法错误有关,如无效标记或未关闭的标记。