tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Customizing SSL in HttpClient
Date Mon, 10 Jun 2013 14:20:42 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Anil,

On 6/10/13 8:42 AM, Anil Goyal -X (anigoyal - Aricent Technologies at
Cisco) wrote:
> 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.

Is there any kind of port-forwarding or anything else going on?

> 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.

Can you show us a bit more of the code? It's not clear from you client
code that the port number is set correctly, and you only mentioned the
server. Can you give us some of that, too? Also, what do your
<Connector> elements look like in server.xml?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRteC5AAoJEBzwKT+lPKRY8TUP/3QuIqKPxB5HjVaUywkPmIQt
+LoZLdHhOLdrkwE2ojW1qk0YnX2wpgr6W3W6uBk5l5yrrdcHAFcOWcNIi9fjl8bo
xW8uZi+vGkyv1Pdii5JJrfDjbxdtbsTpHBn7yoKMUzJ9V9xmHwqNsi89xi/mZLty
hj6LNMvftgpQQdPmoPoLJr4ZfmQj2DAI+wX0u/fNgk8cf5wdHJZZu03COPIeRbam
Gn+fOjfK0YL93ntmLP2PbGtlCprBaqPcZRh+AiKFhg4W7+qGVDXGa2SIvrcWbgdU
qHRKxyJ+5j3o0Y74Q0wKRcSEUXbidEhDAtJCQgNOJJi+S4SYgl2OLOXhkxMABBkS
xYIXsAPu4SoVcuiCpGvb2LhD5uqMOyH0NxCpv/TVFsEzOy2EZHLrts1DYNAyIo7M
zqZv2efOTPwcaHRZxgzUB2s23uzs3aiXiKOzYHB7AALJnASCx4fNeOgZwMxdK6o0
qs09m0EKL29QurG3iKXHCA0dOeZzxV4ZUduFZtR2eLIsayqoKpL6fh+asLZFW40y
ZMOvPzlpXwdRX36IdzwTlwrvMOmynfgGfL/yAdCfqN0hlA0OVo7PYNryxSfZhX+2
O1//zDFNSxs2BS9ErQkNyKP8xfVk76XbYUybsbNtivnxjv1a8N72h3qeuixA/ZUJ
gJEvsTX0kD+rb8xYmIlJ
=Qqhu
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message