I want to send a request to another server from my servlet and get the response being in the same servlet. For Example: arequest :
http://www.anotherserver.com?para=pValue
is sent to anotherserver, and get the response which it sends and then process the response.
You can use Apache HttpClient (http://hc.apache.org/httpcomponents-client-ga/index.html) in your Java code to make HTTP calls.
Example: http://hc.apache.org/httpcomponents-client-ga/httpclient/examples/org/apache/http/examples/client/ClientWithResponseHandler.java