⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 message.jsp

📁 这也是一个java版的留言版
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" %>
<%@ include file="../include/config.jsp" %>
<%@ include file="../include/global.jsp" %>
<%@ include file="../include/dbUtil.jsp" %>
<%@ include file="../include/dbConnect.jsp" %>
<%!
    int ni=-1;
    Hashtable ht = new Hashtable();
%>
<%
try{
    ht.put("10000","未知的返回类型");
    ht.put("1000","操作成功");
    ht.put("1001","权限错误");
    ht.put("1002","没有找到符合要求的数据");
    ht.put("1003","信息输入错误");
    ht.put("1004","缺少操作对象错误");
    ht.put("1005","操作对象类型错误");
    ht.put("1006","操作方式未指定或者不可识别错误");
    ht.put("1007","功能未实现");
    ht.put("1008","没有权限进入该模块");
    ht.put("1009","缺少必要参数");
    ht.put("1010","已经确认完毕");

    ht.put("1111","对不起,当前会话已经过期,请<a href=\"/login.jsp\" target='_top'>重新登陆</a>");

    String URL = "";//接收的url返回到未处理任务
    if(request.getParameter("targetURL")!=null)	URL = request.getParameter("targetURL");
%>
<%@ include file="../include/header.jsp" %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center">
      <p>&nbsp;</p>
      <table width="60%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="2" height="1" bgcolor="#000000"></td>
          <td rowspan="2" width="20"><img src="../image/upright.gif" width="20" height="20"></td>
        </tr>
        <tr>
          <td width="1" bgcolor="#000000"></td>
          <td height="19">&nbsp;</td>
        </tr>
      </table>
      <table width="60%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td bgcolor="#000000" width="1"></td>
          <td align="center">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="80" valign="top"> &nbsp; <img src="../image/ip.gif" width="13" height="15" align="absmiddle">
                  <b class="css105">
                  <%
                    if (request.getParameter("title") != null)
                      out.print(request.getParameter("title"));
                    else
                      if (request.getAttribute("title") != null)
                        out.print(request.getAttribute("title").toString());
                      else
                        out.print("提醒");
                  %>
                  </b></td>
              </tr>
              <tr>
                <td height="1" background="image/dbbg.gif"></td>
              </tr>
              <tr>
                <td align="center" height="70" bgcolor="#E2F5FE">
                  <p>
                  <%
                     String errno;

                     if (((errno = request.getParameter("errno")) == null)
                         && ((errno = (String)request.getAttribute("errno")) == null)
                         && ((errno = request.getParameter("remark")) == null)
                         && ((errno = (String)request.getAttribute("remark")) == null))
                       errno = "10000";     //default error
                     else
                        errno = errno.trim();

                     if(errno.equals("1"))
                        errno = "1001";
                     else if(errno.equals("2"))
                        errno = "1002";
                     else if(errno.equals("3"))
                        errno = "1003";

                     out.print("<i>Returned Code </i><b>"+errno+"</b><br>");
                     out.print("<i>Info </i>"+((ht.containsKey(errno))?(ht.get(errno)):(ht.get("10000"))).toString());

                     out.print("<br><i>"+((request.getParameter("msg")==null)?(""):(request.getParameter("msg"))+"</i>"));
                     out.print("<br><i>"+((request.getAttribute("msg")==null)?(""):((String)request.getAttribute("msg"))+"</i>"));
                  %>
                  </p>
-------------------------------------------------
<p>
                  <%
                    if (1==0)
                    {
                    try{
                      Enumeration e=request.getParameterNames();
                      String ok;
                      out.println("<i>parameters:</i><br>");
                      while(e.hasMoreElements()){
                        ok=(String)e.nextElement();
                        out.println("&nbsp;&nbsp;&nbsp;&nbsp;'"+ok+":"+request.getParameter(ok)+"'<br>");
                      }
                      out.println("<br>");
                      e = request.getAttributeNames();
                      out.println("<i>attributes:</i><br>");
                      while(e.hasMoreElements()){
                        ok=(String)e.nextElement();
                        out.println("&nbsp;&nbsp;&nbsp;&nbsp;'"+ok+":"+request.getAttribute(ok).toString()+"'<br>");
                      }
                        out.println("<br>");
                    }
                    catch(Exception e){
                      e.printStackTrace();
                    }
                    }
                  %>
</p>--------------------------------------------------
<%
if(URL!=null&&URL.equals(""))
{
%>
                  <p><a href="javascript:history.back()">返回</a></p>
<%
}
else
{
%>
                  <p><a href="<%=URL%>">返回</a></p>
<%
}
%>
                </td>
              </tr>
              <tr>
                <td height="1" background="image/dbbg.gif"></td>
              </tr>
              <tr>
                <td align="right"><img src="../image/type.gif" width="144" height="120"></td>
              </tr>
            </table>
          </td>
          <td bgcolor="#000000" width="1"></td>
        </tr>
      </table>
      <table width="60%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td rowspan="2" width="20"><img src="../image/downleft.gif" width="20" height="20"></td>
          <td height="19">&nbsp;</td>
          <td bgcolor="#000000" width="1"></td>
        </tr>
        <tr>
          <td colspan="2" bgcolor="#000000" height="1"></td>
        </tr>
      </table>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<%@ include file="../include/footer.jsp" %>
<%}catch(Exception e){alertPage(response,7775,e.toString());}finally{}%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -