Package org.jboss.seam.servlet.event.ImplicitServletObjectsHolder

Examples of org.jboss.seam.servlet.event.ImplicitServletObjectsHolder.InternalServletResponseEvent


    public void init(FilterConfig config) throws ServletException {
    }

    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
            ServletException {
        fireEvent(new InternalServletResponseEvent(response), InitializedLiteral.INSTANCE);
        Path path = null;
        if (request instanceof HttpServletRequest) {
            path = new PathLiteral(HttpServletRequest.class.cast(request).getServletPath());
            fireEvent(response, InitializedLiteral.INSTANCE, path);
            fireEvent(new HttpServletRequestContext(request, response), InitializedLiteral.INSTANCE, path);
        } else {
            fireEvent(response, InitializedLiteral.INSTANCE);
            fireEvent(new ServletRequestContext(request, response), InitializedLiteral.INSTANCE);
        }

        try {
            if (!response.isCommitted()) {
                chain.doFilter(request, response);
            }
        } finally {
            if (request instanceof HttpServletRequest) {
                fireEvent(response, DestroyedLiteral.INSTANCE, path);
                fireEvent(new HttpServletRequestContext(request, response), DestroyedLiteral.INSTANCE, path);
            } else {
                fireEvent(response, DestroyedLiteral.INSTANCE);
                fireEvent(new ServletRequestContext(request, response), DestroyedLiteral.INSTANCE);
            }
            fireEvent(new InternalServletResponseEvent(response), DestroyedLiteral.INSTANCE);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.seam.servlet.event.ImplicitServletObjectsHolder.InternalServletResponseEvent

Copyright © 2018 www.massapicom. 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.