Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Java applet to download files using logins

    hey guys! This is my first time on the forums - and im very new to java - but i am looking at doing something which looks tricky but probably isnt that hard.

    I currently work at Drytron and because its a franchise system we have to download the next days work from the website every afternoon - as we now have around 8 franchises its becoming difficult to go through onto every account and manually download and print 2 copies of each - every day.

    So i planned on making an applet which will automatically do it at a specified time every day - automatically log in and print off the pdf's (which are labelled:
    "V1_14032008.pdf"

    14032008 - being tomorrows date for tomorrows jobs (each day it increments of course)

    They all have that title just depends on who you log on as.

    http://www.drytroncc.com.au/jobsys/i...1_14032008.pdf

    will just get you a logon screen.

    By typing in www.drytroncc.com.au and looking at the source can anyone tell me if its possible to type in something like:

    http://www.drytroncc.com.au/jobsys/i...1_14032008.pdf

    which will just hot link me to each of those files?

    then i will have to make a code to increment the date of that pdf file
    and something to print 2 copies.


    Any help even if you help me with one part would be appreciated.

    Cheers
    -Rj

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    you should take a look at the apache httpcomponents http://hc.apache.org/ which will let you make requests to the server
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow

  • #3
    New to the CF scene
    Join Date
    Mar 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    which files do i need sorry?

    and what will that help me achieve?

  • #4
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    if you use the HttpClient from the HttpComponents library you would be able to make HTTP requests to any server with authentication. So essentially you can simulate what you are doing in the browser using java code. You can login into the site and then request for the pdf files so that you aren't redirected back to the login page
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

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