資源簡(jiǎn)介
本系統(tǒng)主要采用JSP為編程語(yǔ)言,可以方便管理小區(qū)車輛管理需要。后臺(tái)主要包括車輛管理,停車卡管理,車位管理等功能。

代碼片段和文件信息
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“?“請(qǐng)正確輸入用戶名!“);
request.getRequestDispatcher(“index.jsp“).forward(request?response);
}
else?if(password?==?null||password.trim().equals(““)){
request.setAttribute(“message“?“請(qǐng)輸入密碼!“);
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();
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????1232375??2010-02-10?16:03??小區(qū)車輛管理系統(tǒng)錄像.exe
-----------?---------??----------?-----??----
??????????????1232375????????????????????1
評(píng)論
共有 條評(píng)論