Two Servlet Filters Every Web Application Should Have
Subject:   Bug with weblogic 8.1 ?
Date:   2004-01-07 02:32:44
From:   anonymous2
Response to: Bug with weblogic 8.1 ?

I found the error (weblogic bug ?):

My index.jsp forwards to another page (using struts tag) And Weblogic applies the servlet filter to this forward, so the resulting HTTP response is a gzipped gzip !

Does it looks like a Weblogic bug ? I don't know about servlet API spec about this, but tomcat (reference implementation) DOESN'T apply filter to internally forwarded contents.

I added this code to com.jspbook.GZIPFilter to make it work on Weblogic :

private final static String FLAG
= "com.jspbook.GZIPFilter.doFilter";

public void doFilter(
ServletRequest req,
ServletResponse res,
FilterChain chain)
throws IOException, ServletException {

if (req instanceof HttpServletRequest) {
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) res;

// Avoid filtering when forwarded from a previous filtered URI
if (request.getAttribute(FLAG) != null) {
chain.doFilter(request, response);
request.setAttribute(FLAG, "true");


1 to 2 of 2
  1. Bug with weblogic 8.1 ?
    2007-07-22 23:53:33  ManfredJS [View]

  2. Bug with weblogic 8.1 ?
    2007-07-22 23:50:27  ManfredJS [View]

1 to 2 of 2