No errors are displayed
It shouldn't, this code do nothing
new HttpGet("/path-to-my-service/myService");
I suppose you trying to call external services with http client, you must provide full http call code to get it
thomething lik this, example for http client 4.3
public static String executeGet(String url) {
CloseableHttpClient httpClient = HttpClients.createDefault();
CloseableHttpResponse response = null;
String resp = null;
try {
HttpGet httpGet = new HttpGet(url);
response = httpClient.execute(httpGet);
int code = response.getStatusLine().getStatusCode();
if (code == HttpURLConnection.HTTP_OK) {
resp = EntityUtils.toString(response.getEntity());
} else {
// handle wrong response here
}
} catch (IOException e) {
e.printStackTrace();
} finally {
if (response != null) {
close(response);
}
}
return resp;
}
You should provide full url to this method, this means you should know host name. If you know that your portlet and your services on the same host you can get host name from ServletRequest, every portal implementation provide approach to get HttpServletRequest from PorteltRequest