This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
i'm writing a program that needs to access details from a secure web server, it's basically person data drawn from a database that is displayed on a webpage. you are prompted to enter a password, but once you've entered the password, you pull up as many details as you like. (fully authorised to do this by the way!)
i intend to simply modify the end part of the url - looking like - .../address.asp?Mem_id=34812 - changing the number to pull up different records thru the program. once i've done this, i'm using java to convert the html and then process as xml to enter into another database. my problem is - i'm not sure exactly how to write the code for the password to be entered, here's the bit where it's going wrong...
This has nothing to do with ports. The fact that you entered the password in a browser is irrelevant for the Java application. The connection from the Java client also needs to set the password. I don't know how the helper classes you use retrieve HTML, but if there is a java.net.URLConnection (or one of its subclasses) involved somewhere, then the way to do it is described here. If not, study the API of the classes you use to see if there is a way to set the password.
Ping & DNS - updated with new look and Ping home screen widget
Joined: Oct 12, 2006
(i've mispelled Kookie on purpose as it wont let me post with right spelling)
i'm thinking of taking up the url connection solution, i'm currently trying to use jakarta httpclient - which enables you to set kookies, but i keep getting a - package org.apache.commons.httpclient does not exist - error, even tho i have it installed & its dependancies!
i just cant see where i'm going wrong here... any ideas? if not, i'll have to give up on this train & go for the url connection one which does look good & i'm going to investigate anyway, thanks a lot for the cogent help
I notice that in your classpath, just before the httpclient entry, there seems to be some whitespace. Not sure whether that's the problem, but you might want to investigate in that direction...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Oct 12, 2006
oh. my. god. it was the whitespace!!! Ilja, you are my hero, thank you!