Package javax.servlet

Examples of javax.servlet.Filter.doFilter()


    };

    Filter filter = new HostnameFilter();
    filter.init(null);
    assertNull(HostnameFilter.get());
    filter.doFilter(request, response, chain);
    assertTrue(invoked.get());
    assertNull(HostnameFilter.get());
    filter.destroy();
  }
View Full Code Here


                    SecurityUtil.doAsPrivilege
                        ("doFilter", filter, classType, args, principal);
                   
                    args = null;
                } else
                    filter.doFilter(request, response, this);
                }

                support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
                                          filter, request, response);
            } catch (IOException e) {
View Full Code Here

                    SecurityUtil.doAsPrivilege
                        ("doFilter", filter, classType, args);
                   
                    args = null;
                } else
                    filter.doFilter(request, response, this);
                }

                support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
                                          filter, request, response);
            } catch (IOException e) {
View Full Code Here

                    SecurityUtil.doAsPrivilege
                        ("doFilter", filter, classType, args);
                   
                    args = null;
                } else
                    filter.doFilter(request, response, this);
                }

                support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
                                          filter, request, response);
            } catch (IOException e) {
View Full Code Here

        Filter nextFilter = (Filter) additionalFilters.get(currentPosition - 1);
        if (logger.isDebugEnabled()) {
          logger.debug(url + " at position " + currentPosition + " of " + additionalFilters.size()
              + " in additional filter chain; firing Filter: '" + nextFilter + "'");
        }
        nextFilter.doFilter(request, response, this);
      }
    }
  }

}
View Full Code Here

                                                    FilterChain.class};
                    Object[] args = new Object[]{req, res, this};
                    SecurityUtil.doAsPrivilege
                        ("doFilter", filter, classType, args);
                } else
                    filter.doFilter(request, response, this);
                }

                support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
                                          filter, request, response);
            } catch (IOException e) {
View Full Code Here

            Filter filter = null;
            try {
                filter = filterConfig.getFilter();
                support.fireInstanceEvent(InstanceEvent.BEFORE_FILTER_EVENT,
                                          filter, request, response);
                filter.doFilter(request, response, this);
                support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
                                          filter, request, response);
            } catch (IOException e) {
                if (filter != null)
                    support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT,
View Full Code Here

    if (filter != null) {
      ServletRequest request = (ServletRequest) exec.getNativeRequest();
      ServletResponse response = (ServletResponse) exec.getNativeResponse();
      ServletResponse resp = BufferedResponse.getInstance(response, new NullWriter());
      try {
        filter.doFilter(request, resp, new NullFilterChain());
      } catch(Exception ex1) {
        throw UiException.Aide.wrap(ex1); //should never occur
      }
     
      //after filter chain, SecurityContext could have changed
View Full Code Here

            Filter filter = filters.get(currentCount);

            if (logger.isDebugEnabled())
                logger.debug("Getting filter for " + currentCount + ObjectUtils.identityToString(filter));
           
            filter.doFilter(request, response, this);
        }
        else if (servlet != null) {
            servlet.service(request, response);
        } else {
            incomplete = true;
View Full Code Here

        } else if (target instanceof HttpServlet) {
            HttpServlet servlet = (HttpServlet) target;
            servlet.service(request, response);
        } else if (target instanceof Filter) {
            Filter filter = (Filter) target;
            filter.doFilter(request, response, filterChain);
        } else {
            logger.warn("invoke called with target " + (target != null ) + " which is not an instance of " + HttpServiceInvoker.class.getSimpleName() + ", " +
                    HttpServlet.class.getSimpleName() + " or " + Filter.class.getName());
        }
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.