View Full Version : Java applet to download files using logins

03-13-2008, 08:41 AM
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:

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.


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:


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.


03-13-2008, 12:18 PM
you should take a look at the apache httpcomponents http://hc.apache.org/ which will let you make requests to the server

03-14-2008, 06:42 AM
which files do i need sorry?

and what will that help me achieve?

03-14-2008, 10:34 AM
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