I just wrote my first MessageBodyWriter. Unless I call the flush
method on the Writer that I created using the entityStream in the
writeTo method, I can't get any response from the server. It says the
content length is 0 when I look at the response headers even though I
set it to something else. If I call flush, everything works fine. Is
this the expected behavior? The javadoc of MessageBodyWriter states
that I should not close the output stream.
I am using Jersey 1.0.2 and deploying on Glassfish V3 Prelude.
Thanks