• 大小: 8.49MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-23
  • 语言: Java
  • 标签: JAVAWE  

资源简介

饿了么的基础框架,可作于基本的参考系统,是基于javaweb 的代码

资源截图

代码片段和文件信息

package com.chenswe.adminmanager.action;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.chenswe.adminmanager.entity.Admin;
import com.chenswe.adminmanager.service.AdminService;
import com.chenswe.adminmanager.service.impl.AdminServiceImpl;

/**
 * Servlet implementation class AdminLoginAction
 */
@WebServlet(“/AdminLogin.action“)
public class AdminLoginAction extends HttpServlet {
private static final long serialVersionUID = 1L;
       
protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
Admin admin = new Admin();
admin.setUsername(request.getParameter(“form-username“));
admin.setPassword(request.getParameter(“form-password“));

AdminService service = new AdminServiceImpl();
boolean success = service.checkLoginInfo(admin);

HttpSession session = request.getSession();
if (success) {
// 添加session属性
session.setAttribute(“adminLoginStatus“ “true“);
session.setAttribute(“adminname“ admin.getUsername());

// 重定向到个人中心
response.sendRedirect(request.getContextPath() + “/pages/profiles/admin.jsp“);
} else {
session.setAttribute(“adminLoginStatus“ “false“);

String url = request.getHeader(“referer“);
if (url.lastIndexOf(‘?‘) > 0)
url = url.substring(0 url.lastIndexOf(‘?‘));

response.sendRedirect(url);
}
}

protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
doGet(request response);
}

}

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

     文件        841  2019-03-23 19:49  order\.classpath

     文件          8  2016-12-17 08:41  order\.gitignore

     文件        905  2019-03-23 19:49  order\.project

     文件        567  2019-03-23 19:49  order\.settings\.jsdtscope

     文件        364  2019-03-23 19:49  order\.settings\org.eclipse.jdt.core.prefs

     文件        467  2019-03-23 19:49  order\.settings\org.eclipse.wst.common.component

     文件        345  2019-03-23 19:49  order\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2019-03-23 19:49  order\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2019-03-23 19:49  order\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       2729  2019-03-23 20:36  order\build\classes\com\chenswe\adminmanager\action\AdminLoginAction.class

     文件       1740  2019-03-23 20:36  order\build\classes\com\chenswe\adminmanager\action\AdminLogoutAction.class

     文件        196  2019-03-23 20:36  order\build\classes\com\chenswe\adminmanager\dao\AdminDAO.class

     文件       1986  2019-03-23 20:36  order\build\classes\com\chenswe\adminmanager\dao\impl\AdminDAOImpl.class

     文件        760  2019-03-23 20:36  order\build\classes\com\chenswe\adminmanager\entity\Admin.class

     文件        208  2019-03-23 20:36  order\build\classes\com\chenswe\adminmanager\service\AdminService.class

     文件        786  2019-03-23 20:36  order\build\classes\com\chenswe\adminmanager\service\impl\AdminServiceImpl.class

     文件       1403  2019-03-23 20:36  order\build\classes\com\chenswe\filter\Character.class

     文件       2929  2019-03-23 20:36  order\build\classes\com\chenswe\filter\CheckLogin.class

     文件       2016  2019-03-23 20:36  order\build\classes\com\chenswe\filter\SellerFore.class

     文件       1786  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\action\FinishOrderAction.class

     文件       1996  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\action\GetOrderDetailAction.class

     文件       2221  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\action\GetSellerOrderBriefAction.class

     文件       1540  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\action\SubmitOrderAction.class

     文件       1713  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\action\UpdateOrderStatusAction.class

     文件      12378  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\dao\impl\OrderDAOImpl.class

     文件       1136  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\dao\OrderDAO.class

     文件       1026  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\entity\Food.class

     文件        843  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\entity\FoodInOrder.class

     文件       4202  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\entity\Order.class

     文件        783  2019-03-23 20:36  order\build\classes\com\chenswe\ordermanager\entity\OrderBrief.class

............此处省略368个文件信息

评论

共有 条评论