資源簡(jiǎn)介
本系統(tǒng)完全符合期末大作業(yè)的規(guī)則,沒(méi)有實(shí)現(xiàn)太厲害的技術(shù),但是應(yīng)付大作業(yè)足以,里面的代碼量挺大,但是運(yùn)用的都是一些網(wǎng)站的基礎(chǔ)知識(shí),在你自己的電腦上部署好,配置到運(yùn)行環(huán)境,可直接運(yùn)行。
代碼片段和文件信息
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
}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????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個(gè)文件信息
評(píng)論
共有 條評(píng)論