• Post Reply Bookmark Topic Watch Topic
  • New Topic

Secure File Transfer  RSS feed

 
Ashwin Philar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!! Everyone,
I am Ashwin Philar at the University of Alabama at Birmingham. I am a graduate student of the Computer Engineering Department here.
I am doing a project that involves invoking a cgi script invoked using https:// protocol and downloading the files whose names appear on the resulting web page from a remote server onto my local machine.
Has anyone used the Java Secure Socket Extension or httpsURLConnection class to do any such thing?
Please help me if you have handled this issue..
Thanks
Ashwin Philar
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type of environment does this need to run in? From a simple web page you cannot easily start up multiple downloads, and doing so will force the user to click his way through a dozen dialog boxes. In practice, it is difficult to get an applet to write to the local filesystem or get out of the sandbox in general, and still have it run on all systems out there. Java WebStart or a Java application can do it, but that may not be an option.
- Peter
 
chris snyder
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been using the JSSE for a little while. If you need some direction, check out some sample code in the recent post (12/11) - "URL and HTTPS"
Chris
 
Ashwin Philar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!! Peter,
Thanks for your prompt reply.
At my end I have a Win 2000 box and at the other end there might be IIS.
I figured that passing username and password within the URL works fine.
Then I get this web page with links to .txt files.
I hope I can parse the resulting html page and store all the urls therein in a vector and then use each of these urls to download the files.
The problem is how do I encrypt the files as I copy them from the remote machine onto my machine?
Thanks
Ashwin
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HTML page with the link ends up being interpreted by a Java application? In that case, it's really simple - use the normal java.net.URL class and download the content the way you would download any URL resource (call openStream(), etc). The only difference is that you pass a "https://" type URL instead of a "http://" one.
This is actually the easiest way by far to use JSSE; it installs a new protocol handler and you just use URLs like you always did.
Does that answer your question, or do I have a wrong picture of what you are trying to do?
- Peter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!