I am using the restTemplate object to post to a controller in another web app deployed on tomcat- I keep getting the following error:
java.net.SocketException: Unexpected end of file from server
Here is the code to post the request:
RestTemplate restTemplate = new RestTemplate();
restTemplate.getForObject("http://localhost:8080/myapp" + "/{message}",String.class, "mymessage");
Here is the controller server side code:
@RequestMapping(value = "/myapp/{message}", method = RequestMethod.GET)
public void processMessage(@PathVariable String message){
//TODO
}
Any help into what I am doing wrong?
Thanks


Reply With Quote
