You could write a java application that acts like a simple web server (assuming there isnt one already running on that machine). In your code create a ServerSocket and have it wait at port 80, when incoming requests come in you have to parse the data and check whether is it is a POST or GET (those appear as is) then you need to figure out how to get the information out of the text sent it. Keep in mind that this is not a fully functional web server and will not serve files it only accepts requests. Also security maybe lacking , but its a start...of course I would recomend JSP and Servelts but if you really want it to be a java app this is one way...good luck
I think these are the steps to take, I have written a cpl of these stand alone programs when I was still in school. Don't have them here though.
1) Open a socket connection to the web server (port 80)
2) Send a HTTP Header and request.
3) Send the HTML answer. (filled in form with username and password)
4) Read the servers answer (if correct uid you'll get the next html page)
5) close the socket
6) parse the html page you just received.
Have a look at:
http://www.javaworld.com/javaworld/javatips/jw-javatip41.html?
Have fun