This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Accessing a directory on a secure site Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Accessing a directory on a secure site" Watch "Accessing a directory on a secure site" New topic
Author

Accessing a directory on a secure site

Rajeev Muralidharan
Greenhorn

Joined: Oct 28, 2003
Posts: 9
All,
Here's a piece of code I've got to access a https site. It's fine as far as getting to the host. example: www.bankofrajeev.com But I need to go to a directory beyond the host like www.bankofrajeev.com/outbound. I need to use the SSLSocket and how can this be accomplished? Please help as I have to finish this project by today. My previous question didn't evoke any response and I think I've resolved it. So please do help!!!
SSLSocketFactory sf = sslContext.getSocketFactory();
System.out.println("created socket factory");
SSLSocket socket = (SSLSocket)sf.createSocket( host, port );
Rajeev.
Rajeev Muralidharan
Greenhorn

Joined: Oct 28, 2003
Posts: 9
Please do close the thread. I am doing
SSLSocket socket =
(SSLSocket)sf.createSocket(url.getHost(), 443); to get to the directory.
Thansk all for your time.
 
GeeCON Prague 2014
 
subject: Accessing a directory on a secure site