资源简介
本系统完全符合期末大作业的规则,没有实现太厉害的技术,但是应付大作业足以,里面的代码量挺大,但是运用的都是一些网站的基础知识,在你自己的电脑上部署好,配置到运行环境,可直接运行。
代码片段和文件信息
package com.action;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.dao.AdminDAO;
import com.dao.UserDAO;
import com.dao.impl.AdminDAOImpl;
import com.dao.impl.UserDAOImpl;
import com.model.Admin;
import com.model.User;
public class ADLoginAction extends HttpServlet {
/**
* Constructor of the object.
*/
public ADLoginAction() {
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 {
response.setContentType(“text/html“);
}
/**
* 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(“text/html“);
String aname = request.getParameter(“admin_name“);
String apassword = request.getParameter(“password“);
int isrozen=1;
AdminDAO adminDAO = new AdminDAOImpl();
Admin admin = adminDAO.findByNAP(aname apassword);
if (admin != null) {
RequestDispatcher rd = getServletContext().getRequestDispatcher(
“/houtai2.jsp“);
rd.forward(request response);
} else {
RequestDispatcher rd = getServletContext().getRequestDispatcher(
“/houtai.jsp“);
request.setAttribute(“ADMIN“ admin);
rd.forward(request response);
}
}
/**
* Initialization of the servlet.
*
* @throws ServletException
* if an error occurs
*/
public void init() throws ServletException {
// Put your code here
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-06-01 16:21 闲置商城\
文件 4550 2017-05-31 19:43 闲置商城\xzsc.sql
目录 0 2017-06-01 16:21 闲置商城\xzscALL\
文件 529 2017-05-13 20:48 闲置商城\xzscALL\.classpath
目录 0 2018-01-04 17:43 闲置商城\xzscALL\.myeclipse\
文件 291 2017-05-14 11:53 闲置商城\xzscALL\.myme
文件 1750 2017-05-14 11:53 闲置商城\xzscALL\.project
目录 0 2017-06-01 16:21 闲置商城\xzscALL\.settings\
文件 500 2017-05-13 20:48 闲置商城\xzscALL\.settings\.jsdtscope
文件 74 2017-05-13 20:54 闲置商城\xzscALL\.settings\com.genuitec.eclipse.core.prefs
文件 59 2017-05-14 09:21 闲置商城\xzscALL\.settings\org.eclipse.core.resources.prefs
文件 364 2017-05-13 20:48 闲置商城\xzscALL\.settings\org.eclipse.jdt.core.prefs
文件 456 2017-05-14 11:53 闲置商城\xzscALL\.settings\org.eclipse.wst.common.component
文件 252 2017-05-13 20:48 闲置商城\xzscALL\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2017-05-13 20:48 闲置商城\xzscALL\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2017-05-13 20:48 闲置商城\xzscALL\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2017-06-01 16:21 闲置商城\xzscALL\WebRoot\
文件 3870 2017-05-30 18:13 闲置商城\xzscALL\WebRoot\BigTypeXiu.jsp
目录 0 2018-01-04 17:43 闲置商城\xzscALL\WebRoot\Copy of upload\
文件 6032 2017-05-31 12:25 闲置商城\xzscALL\WebRoot\Fabuxinxi.jsp
文件 5058 2017-05-29 19:14 闲置商城\xzscALL\WebRoot\GoodsSType_list.jsp
文件 5178 2017-05-29 19:15 闲置商城\xzscALL\WebRoot\GoodsType_list.jsp
文件 2773 2017-05-31 19:21 闲置商城\xzscALL\WebRoot\Login1.jsp
目录 0 2017-06-01 16:21 闲置商城\xzscALL\WebRoot\me
文件 36 2017-05-13 20:48 闲置商城\xzscALL\WebRoot\me
文件 4825 2017-05-29 12:42 闲置商城\xzscALL\WebRoot\ModifyAd.jsp
文件 2993 2017-05-15 20:11 闲置商城\xzscALL\WebRoot\Publish.jsp
文件 7111 2017-05-18 16:26 闲置商城\xzscALL\WebRoot\Show_list.jsp
文件 2414 2017-05-15 20:11 闲置商城\xzscALL\WebRoot\Show_list1.jsp
文件 4560 2017-05-30 18:32 闲置商城\xzscALL\WebRoot\SmallTypeGuan.jsp
文件 4037 2017-05-30 18:19 闲置商城\xzscALL\WebRoot\SmallTypeXiu.jsp
............此处省略307个文件信息
评论
共有 条评论