I'm working on a web application in which I would like a servlet to connect to a 3rd party website and download a file into my webapp context. What I need help with is a game plan because there are some things I am unsure about:
1) I see that I should use a URLConnection object to do the brunt of the work. 2) Am I going to need two URLConnection objects since I need to log in first - or rather does one persist across two requests (does this even qualify as two requests)? 3) What's the best way to validate if the login was successful so I know if I can move on to the file download?