コード例 #1
0
  protected boolean isWrap(HttpServletResponse response) {
    if (response instanceof WebLogicIncludeServletResponse) {
      return false;
    }

    boolean wrap = false;

    HttpServletResponseWrapper previousResponseWrapper = null;

    while (response instanceof HttpServletResponseWrapper) {
      if (!wrap && (response instanceof MetaInfoCacheServletResponse)) {
        wrap = true;
      }

      HttpServletResponseWrapper responseWrapper = (HttpServletResponseWrapper) response;

      response = (HttpServletResponse) responseWrapper.getResponse();

      if (responseWrapper instanceof WebLogicIncludeServletResponse) {
        previousResponseWrapper.setResponse(response);
      }

      previousResponseWrapper = responseWrapper;
    }

    return wrap;
  }
コード例 #2
0
  /**
   * Set the response that we are wrapping.
   *
   * @param response The new wrapped response
   */
  void setResponse(HttpServletResponse response) {

    super.setResponse(response);
  }
コード例 #3
0
 public void setResponse(ServletResponse response) {
   super.setResponse(response);
   if (HttpServletResponse.class.isAssignableFrom(response.getClass())) {
     this.response = HttpServletResponse.class.cast(response);
   }
 }