1

I use Jersey to send a GET request:

Client client = Client.create();
WebResource webResource = client.resource(uri);
ClientResponse res = webResource.queryParams(params).get(ClientResponse.class);

//hangs out forever if uri returns big data(maybe > 2Mb, since those code run normally with about 1Mb data)
String result = res.getEntity(String.class);

The application is running on Tomcat 7. Do I need to config anything?

Any help would be much appreciated.

Laurentiu L.
  • 6,566
  • 1
  • 34
  • 60
hoangmeo325
  • 450
  • 2
  • 10
  • 18
  • 1
    Are you sure that its a problem with Jersey and not with the server itself? have you made a manual request to the service? (via curl or browser)? – Paulo Santos Aug 20 '15 at 11:09

1 Answers1

0

There is a byte limit depending on web server as well as from the browser. See here :-

maximum length of HTTP GET request?

There is no size limit in http protocol but their is size limit imposed by server. For response size limit it is very clearly mentioned in Tomcat 7 official documentation here:-

https://tomcat.apache.org/tomcat-7.0-doc/config/http.html

Community
  • 1
  • 1
Goyal Vicky
  • 1,249
  • 16
  • 16