• 大小: 27.27MB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2024-02-21
  • 语言: Java
  • 标签: Java  web  

资源简介

基于Oracle 数据库,采用servlet+jsp+jquery+ajax等技术实现的网上商城后台管理系统

资源截图

代码片段和文件信息

package com.shxt.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoginFilter implements Filter {

@Override
public void destroy() {
// TODO 自动生成的方法存根

}

@Override
public void doFilter(ServletRequest arg0 ServletResponse arg1 FilterChain chain)
throws IOException ServletException {

HttpServletRequest request = (HttpServletRequest)arg0;
HttpServletResponse response = (HttpServletResponse) arg1;
//处理乱码
request.setCharacterEncoding(“UTF-8“);
//获取路径
String url = request.getServletPath();
//去掉不需要过滤的请求
if (“/login/login.jsp“.equals(url) ||“/login.do“.equals(url)||“/loginAjax.do“.equals(url)
||“/plugins/vcode/vcode.jsp“.equals(url)) {

chain.doFilter(arg0 arg1);
return;
}

if (request.getSession().getAttribute(“Name“)==null) {

request.getRequestDispatcher(“/login/login.jsp“).forward(request response);

return;
}

chain.doFilter(arg0 arg1);

}

@Override
public void init(FilterConfig arg0) throws ServletException {


}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-07-22 18:19  back\
     文件         727  2016-12-17 21:25  back\.classpath
     文件        1037  2016-07-22 18:19  back\.project
     目录           0  2016-08-03 19:12  back\.settings\
     文件         567  2016-07-22 18:19  back\.settings\.jsdtscope
     文件         364  2016-07-22 18:19  back\.settings\org.eclipse.jdt.core.prefs
     文件         464  2016-07-22 18:19  back\.settings\org.eclipse.wst.common.component
     文件         305  2016-10-04 17:38  back\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2016-07-22 18:19  back\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2016-07-22 18:19  back\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2016-07-22 18:19  back\build\
     目录           0  2017-01-09 15:13  back\build\classes\
     目录           0  2017-01-09 15:13  back\build\classes\com\
     目录           0  2017-01-09 15:13  back\build\classes\com\shxt\
     目录           0  2017-01-09 15:13  back\build\classes\com\shxt\filter\
     文件        2085  2017-01-09 15:13  back\build\classes\com\shxt\filter\LoginFilter.class
     目录           0  2017-01-09 15:13  back\build\classes\com\shxt\model\
     文件        1078  2017-01-09 15:13  back\build\classes\com\shxt\model\Category.class
     文件        2042  2017-01-09 15:13  back\build\classes\com\shxt\model\Manager.class
     文件        2281  2017-01-09 15:13  back\build\classes\com\shxt\model\Product.class
     目录           0  2017-01-09 15:13  back\build\classes\com\shxt\service\
     文件        4087  2017-01-09 15:13  back\build\classes\com\shxt\service\AnalyzeService.class
     文件        3840  2017-01-09 15:13  back\build\classes\com\shxt\service\CategoryService.class
     文件        1095  2017-01-09 15:13  back\build\classes\com\shxt\service\LoginService.class
     文件        3335  2017-01-09 15:13  back\build\classes\com\shxt\service\ManagerService.class
     文件        2323  2017-01-09 15:13  back\build\classes\com\shxt\service\OrderService.class
     文件        5331  2017-01-09 15:13  back\build\classes\com\shxt\service\ProductService.class
     文件        2158  2017-01-09 15:13  back\build\classes\com\shxt\service\UserService.class
     目录           0  2017-01-09 15:13  back\build\classes\com\shxt\servlet\
     目录           0  2017-01-09 15:13  back\build\classes\com\shxt\servlet\analyze\
     文件        2274  2017-01-09 15:13  back\build\classes\com\shxt\servlet\analyze\DateCountAjaxServlet.class
............此处省略344个文件信息

评论

共有 条评论