資源簡介
jsp酒店管理系統(tǒng) 有論文,有數(shù)據(jù)庫,完整的代碼

代碼片段和文件信息
package?com.action;
/**
?*?管理員登陸?增加?修改?刪除?刪除登陸日志
?*/
import?java.io.IOException;
import?java.util.List;
import?java.util.StringTokenizer;
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.AdminBean;
import?com.bean.SystemBean;
import?com.util.Constant;
import?com.util.MD5;
public?class?AdminServlet?extends?HttpServlet?{
/**
?*?Constructor?of?the?object.
?*/
public?AdminServlet()?{
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);
try{
String?method=request.getParameter(“method“).trim();
AdminBean?loginbean?=?new?AdminBean();
HttpSession?session?=?request.getSession();
session.setMaxInactiveInterval(1200);
SystemBean?systembean?=?new?SystemBean();
String?sysdir?=?systembean.getDir();
if(method.equals(“one“)){//admin登錄
String?username?=?request.getParameter(“username“);
String?password?=?request.getParameter(“password“);
if(username?==?null||username.trim().equals(““)){
request.setAttribute(“message“?“請正確輸入用戶名!“);
request.getRequestDispatcher(“index.jsp“).forward(request?response);
}
else?if(password?==?null||password.trim().equals(““)){
request.setAttribute(“message“?“請輸入密碼!“);
request.getRequestDispatcher(“index.jsp“).forward(request?response);
}
else{
String?md5password?=?MD5.MD5(password);
String?agent?=?request.getHeader(“user-agent“);?
StringTokenizer?st?=?new?StringTokenizer(agent“;“);?
String?useros=st.nextToken();
String?loginip?=?request.getRemoteAddr();
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1048576??2009-06-16?22:25??JSP?酒店管理系統(tǒng)\jdgl.mdf
?????文件????1048576??2009-06-16?22:25??JSP?酒店管理系統(tǒng)\jdgl_log.ldf
?????文件????????645??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\.classpath
?????文件????????285??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\.myme
?????文件???????1222??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\.project
?????文件??????10135??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\action\AdminServlet.java
?????文件???????7255??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\action\HouseServlet.java
?????文件???????7947??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\bean\AdminBean.java
?????文件???????9749??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\bean\HotelBean.java
?????文件???????5758??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\bean\PayBean.java
?????文件???????7604??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\bean\SystemBean.java
?????文件????????318??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\util\CheckCode.java
?????文件???????1838??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\util\Common.java
?????文件????????533??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\util\Constant.java
?????文件???????2666??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\util\DBO.java
?????文件????????650??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\util\Filter.java
?????文件????????792??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\src\com\util\MD5.java
?????文件???????4004??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\hotel\addhouse.jsp
?????文件???????2399??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\hotel\addjiedai.jsp
?????文件???????9122??2009-06-10?22:26??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\hotel\all.jsp
?????文件???????2738??2009-06-10?22:27??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\hotel\house.jsp
?????文件???????8245??2009-06-10?22:26??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\hotel\jiedai.jsp
?????文件???????3790??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\hotel\kai.jsp
?????文件???????8179??2009-06-10?22:26??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\hotel\shouyin.jsp
?????文件???????5298??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\hotel\tui.jsp
?????文件???????2301??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\if
?????文件???????1227??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\if
?????文件???????6537??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\if
?????文件???????2223??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\if
?????文件???????5866??2009-06-10?22:23??JSP?酒店管理系統(tǒng)\kfgl\WebRoot\admin\if
............此處省略105個文件信息
評論
共有 條評論