| | |
| | | package com.fgkj.Filters; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.PrintWriter; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import org.omg.CORBA.Request; |
| | | |
| | | import com.fgkj.actions.ActionUtil; |
| | | |
| | | public class CrossDomainLimitFilter implements Filter{ |
| | | public static final int max_connect_count = 10; |
| | |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setContentType("text/html;charset=utf-8"); |
| | | //检测跨域访问的请求 |
| | | |
| | | //System.out.println("##########################################"); |
| | | //非跨域请求 |
| | | isAlowCrossDomain(response); |
| | | chain.doFilter(request, response); |
| | |
| | | } |
| | | |
| | | public void init(FilterConfig arg0) throws ServletException { |
| | | |
| | | //System.out.println("##########################################"); |
| | | } |
| | | |
| | | public void destroy() { |
| | | |
| | | //System.out.println("##########################################"); |
| | | } |
| | | |
| | | /** |