• 大小: 15.96MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-30
  • 语言: 其他
  • 标签: SSH  

资源简介

基于SSH写的旅游信息管理系统,同时也用了Servlet JDBC 等技术

资源截图

代码片段和文件信息

package com.test.action;

import java.io.IOException;
import java.sql.ResultSet;
import java.sql.SQLException;

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

import com.test.bean.State;

/**
 * Servlet implementation class ChangepasswordServlet
 */
public class ChangepasswordServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public ChangepasswordServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

/**
 * @see HttpServlet#doGet(HttpServletRequest request HttpServletResponse response)
 */
protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
doPost(requestresponse);
}

/**
 * @see HttpServlet#doPost(HttpServletRequest request HttpServletResponse response)
 */
protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
System.out.print(“check in“);
 String passwordprotect=““;
String passwordprotectanswer =““;
   String username=request.getParameter(“username“);
   request.getSession().setAttribute(“username“username);
   ResultSet rs=State.getResultSet(“select * from person where name=‘“+username+“‘“);
   try {
if(rs.next()){
 
   System.out.print(“-------------------“);
    passwordprotect=rs.getString(“passwordprotect“);
 
    request.getSession().setAttribute(“passwordprotect“ passwordprotect);
    passwordprotectanswer=rs.getString(“passwordprotectanswer“);
    request.getSession().setAttribute(“passwordprotectanswer“ passwordprotectanswer);
    request.getRequestDispatcher(“/forgetpass.jsp“).forward(requestresponse);
    
    }else{
        request.getSession().setAttribute(“str“ “此用户名不存在“);
        request.getRequestDispatcher(“/login.jsp“).forward(requestresponse);
    }
   
   }catch(Exception e){
   e.printStackTrace();
   }



}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-04-10 15:24  TravelManageProject\
     文件         661  2013-02-03 18:23  TravelManageProject\.classpath
     文件        1052  2013-01-19 13:03  TravelManageProject\.project
     目录           0  2013-04-10 15:24  TravelManageProject\.settings\
     文件         503  2012-12-05 17:46  TravelManageProject\.settings\.jsdtscope
     文件         215  2013-03-06 19:58  TravelManageProject\.settings\org.eclipse.core.resources.prefs
     文件         364  2013-02-03 18:18  TravelManageProject\.settings\org.eclipse.jdt.core.prefs
     文件         511  2013-01-19 13:03  TravelManageProject\.settings\org.eclipse.wst.common.component
     文件         345  2012-12-05 17:46  TravelManageProject\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2012-12-05 17:46  TravelManageProject\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2012-12-05 17:46  TravelManageProject\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2013-04-10 15:24  TravelManageProject\build\
     目录           0  2013-04-10 15:24  TravelManageProject\build\classes\
     目录           0  2013-04-10 15:24  TravelManageProject\build\classes\com\
     目录           0  2013-04-10 15:24  TravelManageProject\build\classes\com\test\
     目录           0  2013-04-10 15:24  TravelManageProject\build\classes\com\test\action\
     文件        2607  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\ChangepasswordServlet.class
     文件        2535  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\downloadServlet.class
     文件        4484  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\FileUploadAction.class
     文件        5997  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\FileUploadServlet.class
     文件        2423  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\GetAlltouristServlet.class
     文件        2252  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\GetHotelServlet.class
     文件        1942  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\getImageServlet.class
     文件        3985  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\LoadServlet.class
     文件        3423  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\MessageAction.class
     文件        8271  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\PersonAction.class
     文件        3077  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\personupdateServlet.class
     文件        1969  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\PreResetPassServlet.class
     文件        2093  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\RegisterServlet.class
     文件         864  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\showloadServlet.class
     文件        5981  2013-03-13 09:35  TravelManageProject\build\classes\com\test\action\UploadHotelServlet.class
............此处省略151个文件信息

评论

共有 条评论