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

📄 changepsw_jsp.java

📁 题库管理系统,用最新的jsp技术开发的,里面有一些比较好的方法,希望与大家共享
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import TiKuMS.*;

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

  private static java.util.Vector _jspx_dependants;

  static {
    _jspx_dependants = new java.util.Vector(2);
    _jspx_dependants.add("/header.jsp");
    _jspx_dependants.add("/footer.jsp");
  }

  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=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write('\n');
      out.write('\n');
      out.write('\n');
   if(!((LoginInfo)session.getAttribute("loginInfo")).isLogined()){       response.sendRedirect("login.jsp?errorMsg=您还未登录,或者登录已过期");   }   String errorMsg="";   if(request.getParameter("oldPassword")!=null && request.getParameter("newPassword").compareTo(request.getParameter("rePassword"))==0)   {       String sql="select password from "+((LoginInfo)session.getAttribute("loginInfo")).getUserType()+" where "+((LoginInfo)session.getAttribute("loginInfo")).getUserType()+"ID="+((LoginInfo)session.getAttribute("loginInfo")).getUserID();       DataConnection dataConn=new DataConnection();       dataConn.excuteQuery(sql);       if(dataConn.getRs().next())       {              }   }
      out.write("\n");
      out.write("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n");
      out.write("   \"http://www.w3.org/TR/html4/loose.dtd\">\n");
      out.write("<html>\n");
      out.write("    <head>\n");
      out.write("        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n");
      out.write("        <title>阳光题库管理系统</title>\n");
      out.write("    </head>\n");
      out.write("    <body>\n");
      out.write("        <table border=\"0\" width=\"500\" align=\"center\">\n");
      out.write("                <tr>\n");
      out.write("                    <td>");
      out.write("\n");
      out.write("\n");
      out.write("\n");
      out.write("<div align=\"center\" title=\"header\">\n");
if(((LoginInfo)session.getAttribute("loginInfo")).isLogined()){
      out.write("\n");
      out.write("    »");
      out.print(((LoginInfo)session.getAttribute("loginInfo")).getUserName());
      out.write("\n");
      out.write("    &nbsp;|&nbsp;<a href=\"logout.jsp\">退出</a>\n");
      out.write("    &nbsp;|&nbsp;<a href=\"changePSW.jsp\">修改密码</a>\n");
}else{
      out.write("\n");
      out.write("    »您尚未 &nbsp; 登录 &nbsp;注册学生用户\n");
}
      out.write("\n");
      out.write("</div>");
      out.write("</td>\n");
      out.write("                </tr>\n");
      out.write("                <tr>\n");
      out.write("                    <td>\n");
      out.write("                       <fieldset>\n");
      out.write("                           修改密码:\n");
      out.write("                           <form name=\"changePswForm\" method=\"POST\">\n");
      out.write("                           <div>\n");
      out.write("                               <ul>\n");
      out.write("                                   <li>\n");
      out.write("                                       密码:<input type=\"password\" name=\"oldPassword\" />\n");
      out.write("                                   </li>\n");
      out.write("                                   <li>\n");
      out.write("                                       密码:<input type=\"password\" name=\"newPassword\" />\n");
      out.write("                                   </li>\n");
      out.write("                                   <li>\n");
      out.write("                                       密码:<input type=\"password\" name=\"rePassword\" />\n");
      out.write("                                   </li>\n");
      out.write("                                   <li>\n");
      out.write("                                       <input type=\"submit\" value=\"确定\" />\n");
      out.write("                                   </li>\n");
      out.write("                               </ul>\n");
      out.write("                           </div>\n");
      out.write("                           </form>\n");
      out.write("                       </fieldset>\n");
      out.write("                    </td>\n");
      out.write("                </tr>\n");
      out.write("                <tr>\n");
      out.write("                    <td>");
      out.write("\n");
      out.write("\n");
      out.write("<div align=\"center\">\n");
      out.write("    阳光题库管理系统<br/>\n");
      out.write("    Powered by Lingda ©2006 \n");
      out.write("</div>");
      out.write("</td>\n");
      out.write("                </tr>\n");
      out.write("        </table>\n");
      out.write("    </body>\n");
      out.write("</html>\n");
      out.write("\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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -