tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anil Goyal -X (anigoyal - Aricent Technologies at Cisco)" <anigo...@cisco.com>
Subject Customizing SSL in HttpClient
Date Mon, 10 Jun 2013 12:42:36 GMT
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






Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message