資源簡介
本系統采用JAVAEE制作的倉庫管理系統,基本功能都已實現,僅供參考和學習

代碼片段和文件信息
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.EmpBean;
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();
EmpBean?sbean?=?new?EmpBean();
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.nextTok
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-05-23?09:47??javaEE倉庫管理系統\
?????文件??????????81??2014-08-29?14:21??javaEE倉庫管理系統\readme.txt
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\
?????文件?????????411??2014-04-23?21:26??javaEE倉庫管理系統\代碼\.classpath
?????目錄???????????0??2017-05-23?11:14??javaEE倉庫管理系統\代碼\.myeclipse\
?????文件?????????285??2014-04-23?21:26??javaEE倉庫管理系統\代碼\.myme
?????文件????????1410??2014-04-23?22:01??javaEE倉庫管理系統\代碼\.project
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\.settings\
?????文件?????????658??2014-04-23?22:01??javaEE倉庫管理系統\代碼\.settings\.jsdtscope
?????文件??????????49??2014-04-23?22:01??javaEE倉庫管理系統\代碼\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2014-04-23?22:01??javaEE倉庫管理系統\代碼\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\WebRoot\
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\WebRoot\me
?????文件??????????39??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\me
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\action\
?????文件????????7089??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\action\AdminServlet.class
?????文件????????8872??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\action\ba
?????文件????????4399??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\action\StudentsServlet.class
?????文件????????5107??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\action\YdServlet.class
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\bean\
?????文件????????7985??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\bean\AdminBean.class
?????文件????????2729??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\bean\ba
?????文件???????10145??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\bean\CourseBean.class
?????文件???????11198??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\bean\EmpBean.class
?????文件????????2510??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\bean\SystemBean.class
?????目錄???????????0??2017-05-22?16:32??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\util\
?????文件?????????922??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\util\CheckCode.class
?????文件????????2370??2014-04-23?21:26??javaEE倉庫管理系統\代碼\WebRoot\WEB-INF\classes\com\util\Common.class
............此處省略202個文件信息
- 上一篇:仿京東全套jsp模板
- 下一篇:東北大學2018年JAVA試題
評論
共有 條評論