• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

ftp or http or what?

Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to figure out which technology to use. Here's what I need to do:
Currently, my boss goes to a website that displays a login form, and eventually he clicks his way to a listing of URLs to data files that need to be downloaded. This other company posting the information uses servlets to retrieve the data and construct these files dynamically (as far as I can tell). We're going to get much more data in, so I need to automate this process.
I initially assumed I would need to try to open an FTP connection to their site in Java, so I was looking at the Apache Commons Net package. I assume that then I'd have to post the initial forms (login, etc) in Java, and then parse the listing page to find the live URLs to the files. However, I don't want to do this (e.g. learn the Apache Commons Net API) if there's a simpler way. For instance, should I be able to use classes like HttpURLConnection in the java.net API to do all of my interaction with their site? All I know is that when I access their site, it's an https connection. If it's not as easy to use stuff that Sun provides, then by all means I'll try to do it with the Apache package.
Jerry Kreps gave me some advice in another post, but I don't want to start coding with that if my approach is not right!
Thanks for any advice,
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTPS with URL is as simple as the lines marked as added a year ago:

You'll probably have to POST a form to log in. I haven't had great luck with sending POST data through URL. My last try in a JUnit test seemed to be sending everything twice. This was straight from a tutorial someplace on the web.

Hope some of that helps.
[ August 07, 2003: Message edited by: Stan James ]
Oh sure, it's a tiny ad, but under the right circumstances, it gets bigger.
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic