title: Create HttpServletResponse object in Zuul custom filter
body: <p>I have a Zuul custom filter of type <code>PRE_TYPE</code>.
  When I receive the request I want to prevent its routing and instead send a response, in this case a SOAP message, since I am simulating a web service response.
  My custom filter:</p>
  
  <pre><code>  @Component
  public class CustomFilter extends ZuulFilter {
      private ThreadLocal&lt;byte[]&gt; buffers;
  
      @Override
      public boolean shouldFilter() {
          return true;
      }
  
      @Override
      public Object run() {
          RequestContext ctx = getCurrentContext();
          ctx.unset();
          String s= "&lt;soap:Envelope xmlns:......&lt;/soap:Envelope&gt;";
  
  
   }
  
      @Override
      public String filterType() {
          return FilterConstants.PRE_TYPE;
      }
  
      @Override
      public int filterOrder() {
          return 0;
          }
  }
  </code></pre>
  
  <p>I need to create a HttpServletResponse and fill it with my response and write it to the output stream, so the client receives that response.
  How can I create the servletresponse object? </p>