Hi

I am trying to create a http client and send a request to certain port of a 
server using below code:

HttpClient client = new HttpClient();
client.getHostConfiguration().setHost(address, portNumber, protocol);

Here portNumber that I am setting is 8444(https port of tomcat)

When I execute client.executemethod() and at the server side when I tried to 
retrieve request.getRequestURL(), I am getting the url with port 443 not 8444 
which I set in client. Even request.getServerPort is giving 443 not 8444.

The things are working fine for 8081(http port of tomcat) i..e
HttpClient client = new HttpClient();
client.getHostConfiguration().setHost(address, portNumber, protocol);

Here portNumber that I am setting is 8081(https port of tomcat)
When I execute client.executemethod() and at the server side when I tried to 
retrieve request.getRequestURL(), I am getting the url with port 8081 which I 
set in client. Even request.getServerPort is giving 8081.

Thanks
Anil





  • Customizing SSL i... Anil Goyal -X (anigoyal - Aricent Technologies at Cisco)

Reply via email to