users@jersey.java.net

[Jersey] How to set two values of the same type in Response

From: Jitesh Sinha -X (jisinha - Siliconweb Inc. at Cisco) <"Jitesh>
Date: Tue, 5 Jul 2011 10:58:53 -0700

Hi All,

 

I need to set two values of String type in response on server side. One
is filename and the other one is file contents. Do I set them one by one
and then retrieve them on client side one by one?

Also,do I need to get rid of ServleOutputStream on server side
altogether?

 

I am doing something like this on server side -

 

ServletOutputStream sos = response.getOutputStream() ;

sos.println("my stuff") ;

 

Because of the above code,I can retrieve only those values that are
written to Servlet Output Stream.Whatever I write in Response object is
not retrievable.

 

 

Thanks

-Jitesh