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

📄 uedit_jsp.java

📁 网上服装店 能让用户在该网站上对物品进行上传购买等操作。该设计为原版
💻 JAVA
字号:
package org.apache.jsp.user;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import com.bwm.db.Condb;

public final class uedit_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,
      			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("\r\n");
      out.write("\r\n");
      out.write("\r\n");

Condb con2=new Condb();
if(session.getAttribute("username")==null){

      out.write("\r\n");
      out.write("<script language=\"javascript\">\r\n");
      out.write("\talert(\"你必须先登录后才能修改个人资料\");\r\n");
      out.write("\thistory.back();\r\n");
      out.write("</script>\r\n");
	
}else{
	String sql2="select * from tb_User where Username='"+session.getAttribute("username")+"'";
	ResultSet rs2=con2.executeQuery(sql2);
	if(rs2.next()){
	String id=rs2.getString(1);

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<table width=\"562\"   border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
      out.write("   <form action=\"user/ucheck.jsp\" method=\"post\" name=\"form1\">\r\n");
      out.write("  <tr>\r\n");
      out.write("      <td height=\"46\" colspan=\"5\" align=\"center\" background=\"\" bgcolor=\"#EFE9BB\">修改用户信息</td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"144\" rowspan=\"8\" align=\"center\" background=\"images/images/usereg_2.gif\"  style=\"background-repeat:no-repeat\">&nbsp;</td>\r\n");
      out.write("    <td height=\"23\" align=\"right\" class=\"bgcolor\">用户名:</td>\r\n");
      out.write("    <td height=\"23\" align=\"left\"><input name=\"username\" type=\"text\" class=\"txt_grey\" value=\"");
      out.print(rs2.getString(2));
      out.write("\" size=\"32\"  readonly=\"yes\"></td>    \r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"89\" height=\"23\" align=\"right\" class=\"bgcolor\">真实姓名:</td>\r\n");
      out.write("    <td width=\"329\" height=\"23\" align=\"left\"><input name=\"Rname\" type=\"text\" class=\"txt_grey\" value=\"");
      out.print(rs2.getString(3));
      out.write("\" size=\"32\" /></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"23\" align=\"right\" class=\"bgcolor\">密码:</td>\r\n");
      out.write("    <td height=\"23\" align=\"left\"><input name=\"password\" type=\"password\" class=\"txt_grey\" value=\"");
      out.print(rs2.getString(4));
      out.write("\" size=\"32\"></td>\r\n");
      out.write("    </tr>  \r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"23\" align=\"right\" class=\"bgcolor\">Email:</td>\r\n");
      out.write("    <td height=\"23\" align=\"left\"><input name=\"email\" type=\"text\" class=\"txt_grey\" value=\"");
      out.print(rs2.getString(5));
      out.write("\" size=\"32\"></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"21\" align=\"right\" class=\"bgcolor\">地址:</td>\r\n");
      out.write("    <td height=\"21\" align=\"left\"><textarea name=\"address\" cols=\"30\" rows=\"4\" class=\"txt_grey\">");
      out.print(rs2.getString(6));
      out.write("</textarea></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"23\" align=\"right\" class=\"bgcolor\">联系电话:</td>\r\n");
      out.write("    <td height=\"23\" align=\"left\"><input name=\"photo\" type=\"text\" class=\"txt_grey\" value=\"");
      out.print(rs2.getString(7));
      out.write("\" size=\"32\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"23\" align=\"right\" class=\"bgcolor\">找回密码问题:</td>\r\n");
      out.write("    <td height=\"23\" align=\"left\"><input name=\"pass\" type=\"text\" class=\"txt_grey\" value=\"");
      out.print(rs2.getString(8));
      out.write("\" size=\"32\"></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"23\" align=\"right\" class=\"bgcolor\">问题答案:</td>\r\n");
      out.write("    <td height=\"23\" align=\"left\"><input name=\"question\" type=\"text\" class=\"txt_grey\" value=\"");
      out.print(rs2.getString(9));
      out.write("\" size=\"32\"></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"40\" colspan=\"4\" align=\"center\"background=\"\"><input name=\"Submit\" type=\"submit\" class=\"btn_grey\"  value=\"修改\">\r\n");
      out.write("    <input name=\"Submit2\" type=\"reset\" class=\"btn_grey\" value=\"重置\">");
 session.setAttribute("userid",id); 
      out.write("\r\n");
      out.write("          <a href=\"index.jsp\">返回首页</a></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  ");

	}
	}con2.close();
	
      out.write("\r\n");
      out.write("  </form>\r\n");
      out.write("</table>\r\n");
      out.write("\r\n");
      out.write("\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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -