出现错误时的提示页面

package liulixin.org;

import com.opensymphony.xwork2.ActionSupport;

public class ErrorInfo extends ActionSupport{

	public String CuoWu(){
		addFieldError("SingleShowNoExist",getText("存在的就是合理的"));
		return "CuoWu";
	}

}
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
	<package name="default" extends="struts-default">
		<action name="LaiLa" class="liulixin.org.ErrorInfo" method="CuoWu">            
            <result name="CuoWu">/pages/error.jsp</result>
        </action> 
	</package>
</struts>
<%@ page language="java" contentType="text/html; charset=GBK"%>
<%@ taglib uri="/struts-tags" prefix="s2"%>

<html>
<head><title>友情提示</title></head>
<body>
    <center>
        <table border="0" width="650" height="200" cellspacing="0" style="margin-top:20" bgcolor="#F9F9F9">
            <tr>
                <td align="center" style="border:1 solid">
                    <table><tr><td><s2:fielderror/></td></tr></table>
                </td>
            </tr>
        </table>
    </center>
</body>
</html>

源代码:http://pan.baidu.com/share/link?shareid=444691&uk=3878681452

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值