To isolate the problem,I tried setting only one value in response on
server side.
So server side code is like this -
String fileName = "TranslatedContent_" + requestID + "." +format;
Response.ok(fileName).build();
On client side I do -
String fileName = response.getEntity(String.class) ;
Where response is an instance of ClientResponse .
On client side I get filename as blank(empty string).
What can be the issue ?I have removed all references of
ServletOutputStream.
Can someone please help?
Thanks
-Jitesh
From: Jitesh Sinha -X (jisinha - Siliconweb Inc. at Cisco)
Sent: Tuesday, July 05, 2011 10:59 AM
To: users_at_jersey.java.net
Subject: [Jersey] How to set two values of the same type in Response
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