editpwd_jsp.java

来自「jsp_javabean+tomcat的web管理系统!」· Java 代码 · 共 142 行

JAVA
142
字号
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;

public final class editPwd_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.Vector _jspx_dependants;

  public java.util.List getDependants() {
    return _jspx_dependants;
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html; charset=gb2312");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			"", true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      out.write("<title>无标题文档</title>\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write(".style1 {color: #FFFFFF}\r\n");
      out.write("body {\r\n");
      out.write("\tmargin-left: 0px;\r\n");
      out.write("\tmargin-top: 0px;\r\n");
      out.write("\tmargin-right: 0px;\r\n");
      out.write("\tmargin-bottom: 0px;\r\n");
      out.write("}\r\n");
      out.write("-->\r\n");
      out.write("</style>\r\n");
      out.write("<link href=\"css/all.css\" rel=\"stylesheet\" type=\"text/css\">\r\n");
      out.write("<script language=\"javascript\">\r\n");
      out.write("  function checkForm(){\r\n");
      out.write("     if(document.form1.oldPwd.value==''){\r\n");
      out.write("\t    alert(\"旧密码不能为空!\");\r\n");
      out.write("\t\treturn false;\r\n");
      out.write("\t }\r\n");
      out.write("\t if(document.form1.newPwd.value==''){\r\n");
      out.write("\t   alert(\"新密码不能为空!\");\r\n");
      out.write("\t   return false;\r\n");
      out.write("\t }\r\n");
      out.write("\t if(document.form1.newPwd.value!=document.form1.confirmPwd.value){\r\n");
      out.write("\t  alert(\"两次确认密码不一致!\");\r\n");
      out.write("\t  return false;\r\n");
      out.write("\t }\r\n");
      out.write("\t \r\n");
      out.write("  }\r\n");
      out.write("</script>\r\n");
      out.write("</head>\r\n");
      out.write("\r\n");
      out.write("<body>\r\n");

  if(session.getAttribute("msrvUserID")==null){
    out.println("<script>alert('非法进入!');</script>");
	return;
  }

      out.write("\r\n");
      out.write("<table width=\"100%\" height=\"100%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#808080\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"23\"> <span class=\"style1\">后台管理--更改密码</span></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td align=\"center\" valign=\"top\" bgcolor=\"#FFFFFF\"><br>\r\n");
      out.write("        <table width=\"51%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">\r\n");
      out.write("          <tr bgcolor=\"#F2F2F2\">\r\n");
      out.write("            <td height=\"20\" colspan=\"2\">&nbsp;更改密码</td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td height=\"5\" colspan=\"2\" align=\"center\" bgcolor=\"#FFFFFF\"></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("\t\t  <form name=\"form1\" action=\"msrv.UserS\" method=\"post\" onsubmit=\"return checkForm()\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td width=\"14%\" height=\"17\" align=\"center\" bgcolor=\"#FFFFFF\">原始密码</td>\r\n");
      out.write("            <td width=\"86%\" bgcolor=\"#FFFFFF\"><input name=\"oldPwd\" type=\"password\" class=\"textbox\" id=\"oldPwd\" size=\"15\"><input type=\"hidden\" name=\"tsu_id\" value=\"");
      out.print((String)session.getAttribute("msrvUserID"));
      out.write("\"><input type=\"hidden\" name=\"cntrl\" value=\"editPwd\"></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td height=\"17\" align=\"center\" bgcolor=\"#FFFFFF\">新 密 码</td>\r\n");
      out.write("            <td bgcolor=\"#FFFFFF\"><input name=\"newPwd\" type=\"password\" class=\"textbox\" id=\"newPwd\" size=\"15\"></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td height=\"17\" align=\"center\" bgcolor=\"#FFFFFF\">确认密码</td>\r\n");
      out.write("            <td bgcolor=\"#FFFFFF\"><input name=\"confirmPwd\" type=\"password\" class=\"textbox\" id=\"confirmPwd\" size=\"15\"></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td height=\"17\" bgcolor=\"#FFFFFF\">&nbsp;</td>\r\n");
      out.write("            <td bgcolor=\"#FFFFFF\"><input name=\"Submit\" type=\"submit\" class=\"buttons\" value=\"提交\"></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("\t\t  </form>\r\n");
      out.write("          <tr bgcolor=\"F2F2F2\">\r\n");
      out.write("            <td height=\"5\" colspan=\"2\"></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("      </table>\r\n");
      out.write("    <br></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

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