users@jersey.java.net

Re: [Jersey] Servlet Filter - HttpServletResponseWrapper

From: Daniel Manzke <daniel.manzke_at_googlemail.com>
Date: Wed, 11 Feb 2009 19:08:08 +0100

Hi Paul,
I found it. It's not a Jersey problem. It was just an empty stream, because
the file was not found and so there was no generated xml. ;) (My fault)


Bye,
Daniel

2009/2/10 Paul Sandoz <Paul.Sandoz_at_sun.com>

>
> On Feb 10, 2009, at 5:42 PM, Daniel Manzke wrote:
>
> 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?
>>
>>
> Jersey does nothing special in that regard. Jersey just calls
> HttpServletResponse.getOutputStream() and only when it needs to write
> something.
>
> What version of Jersey are are you using? 1.0, if so can you reproduce with
> 1.0.1?
>
> I recommend you identify an exact reproducible case and step through using
> a debugger to see what is going on.
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>


-- 
Mit freundlichen Grüßen
Daniel Manzke