• 大小: 14.52MB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2023-07-22
  • 语言: Java
  • 标签: Servlet  ajax  

资源简介

利用JAVAEE技术开发,搭载三层架构,servlet做控制器,并适量的使用ajax异步获取数据,完成了较简单的在线超市管理系统,适合于个人学习使用。

资源截图

代码片段和文件信息

package team.one.supermarket.authcode;


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 team.one.supermarket.util.Sessionhelper;

/**
 * Servlet implementation class ImageServlet
 */
@WebServlet(“/ImageServlet“)
public class ImageServlet extends HttpServlet {
private static final long serialVersionUID = 1L;

    /**
     * Default constructor. 
     */
    public ImageServlet() {
    }

/**
 * @see HttpServlet#doGet(HttpServletRequest request HttpServletResponse response)
 */
protected void doGet(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
  response.setHeader(“Pragma“ “No-cache“);  
        response.setHeader(“Cache-Control“ “no-cache“);  
        response.setDateHeader(“Expires“ 0);  
        response.setContentType(“image/jpeg“);  
          
        //生成随机字串  
        String verifyCode = RandomValidateCode.generateVerifyCode(4);  
        //存入会话session  
        HttpSession session = request.getSession(true);  
        session.setAttribute(Sessionhelper.VERIFYCODE verifyCode.toLowerCase());  
        //生成图片  
        int w = 80 h = 26;  
        RandomValidateCode.outputImage(w h response.getOutputStream() verifyCode);  
}

/**
 * @see HttpServlet#doPost(HttpServletRequest request HttpServletResponse response)
 */
protected void doPost(HttpServletRequest request HttpServletResponse response) throws ServletException IOException {
// TODO Auto-generated method stub
doGet(request response);
}

}

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

     文件        779  2016-12-09 09:52  Supermarket\.classpath

     文件        911  2016-12-08 10:50  Supermarket\.project

     文件        567  2016-12-08 10:50  Supermarket\.settings\.jsdtscope

     文件        270  2016-12-15 08:57  Supermarket\.settings\org.eclipse.core.resources.prefs

     文件        364  2016-12-08 10:50  Supermarket\.settings\org.eclipse.jdt.core.prefs

     文件        485  2016-12-08 10:50  Supermarket\.settings\org.eclipse.wst.common.component

     文件        345  2016-12-08 10:50  Supermarket\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2016-12-08 10:50  Supermarket\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2016-12-08 10:50  Supermarket\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件        645  2016-12-10 19:27  Supermarket\build\classes\log4j.properties

     文件       2074  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\authcode\ImageServlet.class

     文件       7398  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\authcode\RandomValidateCode.class

     文件        732  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\IDao.class

     文件       1432  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\baseDao.class

     文件       4295  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\CustomerBasicInfoDao.class

     文件       4026  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\CustomerDetailInfoDao.class

     文件       3202  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\CustomerInfoDao.class

     文件       3697  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\DeliveryAddrInfoDao.class

     文件       4780  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\EmployeeInfoDao.class

     文件       3578  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\EncryptInfoDao.class

     文件       4299  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\FeedbackInfoDao.class

     文件       2155  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\FeedbackVODao.class

     文件       3788  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\GoodsInfoDao.class

     文件       4108  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\GoodsInfosDao.class

     文件       4252  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\GoodsTypeInfoDao.class

     文件       3789  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\OrderInfoDao.class

     文件       3581  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\RoleInfoDao.class

     文件       2598  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\RoleRootDao.class

     文件       6359  2016-12-18 16:59  Supermarket\build\classes\team\one\supermarket\dao\impl\SendInfoDao.class

     文件       3633  2016-12-18 15:48  Supermarket\build\classes\team\one\supermarket\dao\impl\ShoppingCartDao.class

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

评论

共有 条评论