users@jersey.java.net

Servlet Filter - HttpServletResponseWrapper

From: Daniel Manzke <daniel.manzke_at_googlemail.com>
Date: Tue, 10 Feb 2009 17:42:52 +0100

Hi,
still developing the Fileserver based on Webdav support for JAX-RS and the
interop project. We took some steps forward. We wrote a Servlet Filter which
let you transform a webdav resource into an interoperable webdav resource
which could be used by a microsoft client. It's no finished yet, but on the
right way.

Therefor I have a question and I hope somebody could help me. ;)

The servlet filter has to wrap the ServletResponse parameter, because we
needed the generated content for post-processing. Example: If the XML has
uses the default ("") namespace -> add a named ("ns0") namespace.
For that we use a XSL transformation. Due some mystical problems, jersey is
sometimes using the original outputstream and not the wrapped one. So the
xml can't be processed. I don't have an idea why this could be, because the
original one gets wrapped.

Maybe someone has an idead? :) Maybe jersey is looking for a
HttpServletResponseWrapper for getting the original response?



Help is appreciated :)



Thanks so far,
Daniel