LoginFilter.java 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ////
  2. //// Source code recreated from a .class file by IntelliJ IDEA
  3. //// (powered by Fernflower decompiler)
  4. ////
  5. //
  6. //package com.happy.filter;
  7. //
  8. //import javax.servlet.*;
  9. //import javax.servlet.http.HttpServletRequest;
  10. //import javax.servlet.http.HttpServletResponse;
  11. //import javax.servlet.http.HttpSession;
  12. //import java.io.IOException;
  13. //import java.util.Enumeration;
  14. //
  15. //public class LoginFilter implements Filter {
  16. // Enumeration param;
  17. //
  18. // public LoginFilter() {
  19. // }
  20. //
  21. // public void init(FilterConfig filterConfig) throws ServletException {
  22. // this.param = filterConfig.getInitParameterNames();
  23. // }
  24. //
  25. // public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
  26. // HttpServletRequest servletRequest = (HttpServletRequest)request;
  27. // HttpServletResponse servletResponse = (HttpServletResponse)response;
  28. // HttpSession session = servletRequest.getSession();
  29. // String path = servletRequest.getRequestURI();
  30. // String isLogin = (String)session.getAttribute("isLogin");
  31. // if (path.indexOf("login.jsp") <= -1 && path.indexOf("branduserbrandlist.action") <= -1 && path.indexOf("/weixin/") <= -1 && path.indexOf("/loginlogin.action") <= -1 && path.indexOf("/WxPaylog.action") <= -1 && path.indexOf("register2.jsp") <= -1 && path.indexOf("/WxPayregister2.action") <= -1) {
  32. // if (isLogin != null && !"".equals(isLogin)) {
  33. // chain.doFilter(request, response);
  34. // } else {
  35. // StringBuffer fileURL = servletRequest.getRequestURL();
  36. // if (fileURL.indexOf(".css") > 0 || fileURL.indexOf(".png") > 0 || fileURL.indexOf(".jpg") > 0 || fileURL.indexOf(".bmp") > 0 || fileURL.indexOf(".gif") > 0 || fileURL.indexOf(".apk") > 0 || fileURL.indexOf(".ipa") > 0 || fileURL.indexOf(".woff") > 0 || fileURL.indexOf(".ttf") > 0 || fileURL.indexOf("image.jsp") > 0) {
  37. // chain.doFilter(servletRequest, servletResponse);
  38. // return;
  39. // }
  40. //
  41. // String contextPath = servletRequest.getContextPath();
  42. // servletResponse.sendRedirect(contextPath + "/jsp/login.jsp");
  43. // }
  44. //
  45. // } else {
  46. // chain.doFilter(servletRequest, servletResponse);
  47. // }
  48. // }
  49. //
  50. // public void destroy() {
  51. // }
  52. //}