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

资源简介

本系统主要采用JSP为编程语言,可以方便管理小区车辆管理需要。后台主要包括车辆管理,停车卡管理,车位管理等功能。

资源截图

代码片段和文件信息

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();

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    1232375  2010-02-10 16:03  小区车辆管理系统录像.exe

----------- ---------  ---------- -----  ----

              1232375                    1


评论

共有 条评论