资源简介
JAVAWEB校园订餐系统项目源码.zip
代码片段和文件信息
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 AdminAction extends HttpServlet {
/**
* Constructor of the object.
*/
public AdminAction() {
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(sysdir+“/login.jsp“).forward(request response);
}
else if(password == null||password.trim().equals(““)){
request.setAttribute(“message“ “请输入密码!“);
request.getRequestDispatcher(sysdir+“/login.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.getRemoteA
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-06-13 20:41 数据库\
文件 12490 2015-04-30 11:04 数据库\wsdc.sql
目录 0 2016-06-13 20:41 毕设源码\
目录 0 2015-04-30 11:02 毕设源码\wsdc\
文件 1495 2015-04-30 11:02 毕设源码\wsdc\.classpath
目录 0 2015-04-30 11:02 毕设源码\wsdc\.myeclipse\
目录 0 2015-04-30 11:02 毕设源码\wsdc\.myeclipse\profiler\
文件 876 2015-04-30 11:02 毕设源码\wsdc\.myeclipse\profiler\wsdc on MyEclipse Tomcat.xm
文件 286 2015-04-30 11:02 毕设源码\wsdc\.myme
文件 1410 2015-04-30 11:02 毕设源码\wsdc\.project
目录 0 2015-04-30 11:02 毕设源码\wsdc\.settings\
文件 500 2015-04-30 11:02 毕设源码\wsdc\.settings\.jsdtscope
文件 111 2015-04-30 11:02 毕设源码\wsdc\.settings\com.genuitec.eclipse.core.prefs
文件 1040 2015-04-30 11:02 毕设源码\wsdc\.settings\com.genuitec.eclipse.j2eedt.core.prefs
文件 86 2015-04-30 11:02 毕设源码\wsdc\.settings\org.eclipse.core.resources.prefs
文件 49 2015-04-30 11:02 毕设源码\wsdc\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2015-04-30 11:02 毕设源码\wsdc\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2015-04-30 11:02 毕设源码\wsdc\WebRoot\
目录 0 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\
文件 835 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\default.jsp
目录 0 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\
目录 0 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\
目录 0 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\
文件 3875 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\fckcontextmenu.js
文件 1422 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\fckdocumentfragment_gecko.js
文件 1728 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\fckdocumentfragment_ie.js
文件 12153 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\fckdomrange.js
文件 2032 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\fckdomrange_gecko.js
文件 4460 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\fckdomrange_ie.js
文件 7691 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\fckeditingarea.js
文件 1517 2015-04-30 11:02 毕设源码\wsdc\WebRoot\FCKeditor\editor\_source\classes\fckelementpath.js
............此处省略804个文件信息
相关资源
- Java并发编程实战.pdf.zip
- Cknife.jar
- Android 基于Tesseract-OCR实现自动扫描识
- Android代码-国产音乐播放器项目听听音
- StarUML5.0中文汉化版文件.zip
- 基于Java的火车票购票系统.zip
- iText-2.1.7.jar
- thinking-in-java.mobi
- 1503java基于Web的实验室机房预约管理系
- Effective_Java_HGWKTBBUZLSF6HAVGBJTHJ4X4CDJD3D
- Android-HowOld.zip
- android个人日程安排课程记录毕设源码
- android学生管理系统毕设源码.rar
- android拼图游戏毕设源码.rar
- The_Thinking_in_Java_Annotated_Solution_Guide(
- 252[WWW.JAVAXXZ.COM][信息办公]学校教务管
- 1024181AndroidSwitch.rar
- 243fd3bb941246b031c160b31f2475df.apk
- (Java技术).rar
- sztj_javaweb_07.zip
- spring2.0 jar
- Android从入门到精通源码.rar
- 图解数据结构使用Java.zip
- keystore转换成pem和pk8工具apltoolsignjar
- Java编程思想-第三版.zip
- java大作业学生管理系统.zip
- Android图书管理系统带服务端完整版
- JoshuaBloch-EffectiveJava-Addison-Wesley2017.p
- java语言程序设计教程张席
- jsp073基于网络的个人日程管理系统.
评论
共有 条评论