1.ACTION
//***************************************
// 直接通过 <html:error/> 输出String的错误提示 youLong add 2009.3.3
//***************************************
else if(retVO.getretVO() instanceof String)
{
ActionErrors errors = new ActionErrors();
String errorss = (String) retVO.getretVO();
errors.add(ActionErrors.GLOBAL_ERROR,new ActionError(errorss));
saveErrors(request,errors);
request.setAttribute("errorss", errorss);
return mapping.findForward("numDataAuditPage"); //检验有问题,返回页面
}
2.JSP 标签
<%@ page import="org.apache.struts.action.Action" %>
<%
String errorss = (String)request.getAttribute("errorss");
%>
<logic:notEmpty name="<%=Action.ERROR_KEY%>">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="font" >
<html:errors/>
</td>
<logic:present name="errorss" scope="request">
<tr>
<td>
<%=errorss%> <br/>
</td>
</tr>
</logic:present>
</tr>
</table>
</logic:notEmpty>