• 大小: 7.7MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-02
  • 语言: Java
  • 标签:

资源简介

本系统前台主要使用JSP作为开发语言,后台使用SqlServer作为数据库管理系统,开发环境是MyEclipse,服务器采用tomcat,

资源截图

代码片段和文件信息

package com.action;

/**
 * 会员注册、修改资料等
 * @author Administrator
 *
 */


import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.bean.MemberBean;
import com.bean.SystemBean;
import com.util.Constant;
import com.util.Filter;
import com.util.MD5;

public class MemberServlet extends HttpServlet {

/**
 * Constructor of the object.
 */
public MemberServlet() {
super();
}

/**
 * Destruction of the servlet. 

 */
public void destroy() {
super.destroy(); // Just puts “destroy“ string in log
// Put your code here
}

/**
 * The doGet method of the servlet. 

 *
 * This method is called when a form has its tag value method equals to get.
 * 
 * @param request the request send by the client to the server
 * @param response the response send by the server to the client
 * @throws ServletException if an error occurred
 * @throws IOException if an error occurred
 */
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {

doPost(requestresponse);
}

/**
 * The doPost method of the servlet. 

 *
 * This method is called when a form has its tag value method equals to post.
 * 
 * @param request the request send by the client to the server
 * @param response the response send by the server to the client
 * @throws ServletException if an error occurred
 * @throws IOException if an error occurred
 */
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {

response.setContentType(Constant.CONTENTTYPE);
request.setCharacterEncoding(Constant.CHARACTERENCODING);
HttpSession session = request.getSession();
MemberBean memberBean = new MemberBean();
String method = Filter.escapeHTMLTags(request.getParameter(“method“).trim());
/*********************************************
 * 会员注册通用(检查用户名 修改密码 reg2.jsp页面跳转)
 *********************************************/
if(method.equals(“reg2“)){//会员注册 reg2.jsp
String username = Filter.escapeHTMLTags(request.getParameter(“username“).trim());
String password = Filter.escapeHTMLTags(request.getParameter(“password“).trim());
String reg_type = Filter.escapeHTMLTags(request.getParameter(“reg_type“).trim());
request.setAttribute(“username“ username);
request.setAttribute(“password“ password);
request.setAttribute(“reg_type“ reg_type);
if(username.trim().equals(“admin“)){
request.setAttribute(“username“ username);
request.setAttribute(“message“ “非法的用户名,请重新选择!“);
request.getRequestDispatcher(“reg2.jsp“).forward(request response);
}
else{
int flag = memberBean.checkRegName(username);
if(flag == Cons

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-03-15 13:33  181JSP腾龙洞景区售票系统\
     目录           0  2015-03-15 09:56  181JSP腾龙洞景区售票系统\tld\
     文件        1563  2011-12-29 14:07  181JSP腾龙洞景区售票系统\tld\.classpath
     目录           0  2015-03-15 09:56  181JSP腾龙洞景区售票系统\tld\.myeclipse\
     文件         282  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\.mymetadata
     文件        1221  2011-12-28 20:08  181JSP腾龙洞景区售票系统\tld\.project
     目录           0  2015-03-15 09:56  181JSP腾龙洞景区售票系统\tld\src\
     目录           0  2015-03-15 09:56  181JSP腾龙洞景区售票系统\tld\src\com\
     目录           0  2015-03-15 13:33  181JSP腾龙洞景区售票系统\tld\src\com\action\
     文件       13552  2011-12-28 16:41  181JSP腾龙洞景区售票系统\tld\src\com\action\MemberServlet.java
     目录           0  2015-03-15 13:33  181JSP腾龙洞景区售票系统\tld\src\com\bean\
     文件        1567  2011-12-29 13:36  181JSP腾龙洞景区售票系统\tld\src\com\bean\ChartGraphics.java
     目录           0  2015-03-15 13:33  181JSP腾龙洞景区售票系统\tld\src\com\util\
     文件        2502  2011-12-28 17:02  181JSP腾龙洞景区售票系统\tld\src\com\util\DBO.java
     文件         650  2011-12-28 16:41  181JSP腾龙洞景区售票系统\tld\src\com\util\Filter.java
     文件         836  2011-12-28 16:41  181JSP腾龙洞景区售票系统\tld\src\com\util\Log.java
     目录           0  2015-03-15 09:56  181JSP腾龙洞景区售票系统\tld\WebRoot\
     目录           0  2015-03-15 15:19  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\
     目录           0  2015-03-15 09:56  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\iframe\
     文件         838  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\iframe\default.jsp
     文件        2265  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\iframe\foot.jsp
     文件        1227  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\iframe\help.jsp
     文件         838  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\iframe\index.jsp
     文件        7351  2011-12-28 21:09  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\iframe\left.jsp
     文件        3088  2011-12-28 20:09  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\iframe\main.jsp
     文件        5711  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\iframe\top.jsp
     目录           0  2015-03-15 09:56  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\images\
     文件       10889  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\images\admin_m.swf
     文件        6221  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\images\Admin_style.css
     文件         825  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\images\bg.jpg
     文件         315  2011-12-28 20:07  181JSP腾龙洞景区售票系统\tld\WebRoot\admin\images\bt_login.gif
............此处省略183个文件信息

评论

共有 条评论

相关资源