Reputation: 229
I've a Spring 3 Controller and it has to do a HTTP request [not a web service call] to another server which will give JSON response, controller then need to parse this JSON response and use it in JSP.
Upvotes: 1
Views: 475
Reputation: 2005
HTTP client from apache is good, also look into jackson which will provide JSON parsing (https://github.com/FasterXML/jackson-core).
UPDATE: Something else you can look into is Spring's RestTemplate. This might be even easier to use than HTTP client.
Upvotes: 2
Reputation: 115418
If you want to perform HTTP request to another server I recommend you to user Apache HTTP client. You can configure it using Spring XML and inject into the context just as any other bean.
Upvotes: 0