Examples of TaggedResponseWrapper


Examples of org.jtalks.jcommune.web.filters.wrapper.TaggedResponseWrapper

     * {@inheritDoc}
     */
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        TaggedResponseWrapper wrappedResponse = new TaggedResponseWrapper((HttpServletResponse)response);
        chain.doFilter(request, wrappedResponse);
        byte[] bytes = wrappedResponse.getByteArray();
        if (wrappedResponse.getContentType() != null && wrappedResponse.getContentType().contains("text/html")) {
            for (TagParser parser : parsers) {
                bytes = parser.replaceTagByContent(wrappedResponse);
                wrappedResponse.setByteArray(bytes);
            }
            response.setContentLength(bytes.length);
        }
        response.getOutputStream().write(bytes);
    }
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.