Results 1 to 2 of 2
  1. #1
    iflyboats is offline Member
    Join Date
    May 2011
    Rep Power

    Default N00b questions - downloading files from a website

    I am attempting to write my first Java program from scratch. My goal is to get it to 1) connect to a certain website, 2) download an MP3 file and 3) add it to an iTunes playlist. I accomplished step #1 using URL and URLConnect instances. Now I am on step #2, which requires me to enter login information before I can download the file. So my question is: how do I instruct the program to enter my username and password into the respective fields? I am not necessarily looking for explicit coding instructions, just general guidance on what topics I need to look up and read about. Any advice would be appreciated.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    If you are downloading an HTML page that contains a <FORM tag that you want your program to "fill-in" and return to the server, you need to understand what the browser sends back to the server when it loads an html page with a forum and the user fills in the fields and presses submit.
    I assume that you want your program to "simulate" a browser with a user.

    If you can get a simple HTTP server that will show you its traffic, or some plug-in for a browser that shows the traffic, it would be easy to see what is sent by the browser.

Similar Threads

  1. Downloading FILES from a server
    By yap_1991 in forum New To Java
    Replies: 12
    Last Post: 07-26-2010, 10:59 AM
  2. Couple more questions on JAR Files :S
    By Lil_Aziz1 in forum New To Java
    Replies: 13
    Last Post: 06-05-2010, 09:44 AM
  3. OutofMemory while downloading large files through FTP
    By deb_santanu in forum Advanced Java
    Replies: 0
    Last Post: 11-13-2008, 02:04 PM
  4. running .class files on a website
    By jklsemicolon in forum Networking
    Replies: 10
    Last Post: 08-08-2008, 07:21 AM
  5. Problems with downloading Files from Applet
    By Albert in forum Java Applets
    Replies: 1
    Last Post: 07-05-2007, 06:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts