-
Jun 25th, 2012, 01:15 PM
#1
RestTemplate
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules