首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

异常页面

2012-11-22 
错误页面%@ page languagejava contentTypetext/html charsetUTF-8??? pageEncodingUTF-8%%

错误页面

<%@ page language="java" contentType="text/html; charset=UTF-8"
??? pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<%@ taglib uri="/struts-tags" prefix="s"%>
<link href="${ctx }/css/style_mmsc.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="Javascript1.1">
function onBackClick(url){
? if (url.value == "-1")
?{
??
??window.history.back(-1);
?}
?else
?{
??
?? var backurl = url.value;
?? ??window.location.href=backurl;
?}
}?
</script>
<html>
?<head>
??<title>Result Page</title>
?</head>
<body >
<form name="resultForm" method="post">
<input type="hidden" name="backurl" value="<s:property value="backUrl" />"/>
<table width="100%" height="100" border="0" cellpadding="0" cellspacing="0">
? <tr>
??? <td width="18" valign="bottom" border="0" cellspacing="0" cellpadding="0">
????? <tr>
??????? <td /></td>
??????? </tr>
??? </table></td>
??? <td width="20" bgcolor="#FFFFFF"><table width="400" height="150" border="0" cellpadding="0" cellspacing="0" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="111" rowspan="2"><div align="center">
<img src="${ctx }/image/lost_icon.gif" width="59" height="81">
</div></td>
            <td width="287" height="57"><div id="ajaxMessge" style="display:"><s:actionerror/></div></td>
         </tr>
          <tr>
            <td><div align="center">
              <input name="back" type="button" id="back" value="<s:text name='wg.cfg.back'/>"  
              onMouseout="this.className='login_button';" onMouseOver="this.className='login_button_on';"
onClick='javascript:onBackClick(resultForm.backurl)'/>
           </div>
</td>
          </tr>
        </table>
</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="right" bgcolor="#FFFFFF" bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
  <tr>
    <td class="right_table4_left_bg">&nbsp;</td>
    <td class="right_table4_center_bg">&nbsp;</td>
    <td class="right_table4_right_bg">&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html> 2 楼 aiyalhw 2009-12-27   设置错误信息以及路径
在struts2中设计
public class ESMEDescAction extends Struts2Action
public String edit() throws Exception {
    //struts2 add error hint msg
    addActionError(getText("errors.existing.repeat"));

    this.backUrl = "-1";
    this.backUrl ="http://www.test.com";
     return ERROR;

}
}


public class Struts2Action extends ActionSupport{

......
}

热点排行