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.
- Are there standard spring classes which I can use?
- Can I use Apache Http Client API for this?
- What is best way to implement this?
- Does spring has classes to parse JSON text?
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.