I have been looking everywhere but could not find a tutorial for this. I want to make a simple way to login to a website’s login form via java. I have no code so I was hoping one of you guys will have some example code for this; Or if you can redirect me to some website — that’d be good too.
Question: How do I make a Java program to access a website’s Login form and simply log on?
Reason I need this: I have code to login to a MySQL database but I wanted to try to login to a websites login form instead. WARNING: this is NOT for a school project at all. Just personal stuff
How much research have I done: I’ve looked for a couple weeks now and can’t find much on this. Please help me; I’m in dire need of this.
From your comment to Alexwho96’s answer I guess you want to automate the login process to an existing login page.
AFAIK HtmlUnit should be able to do this (normally used for unit testing).
http://htmlunit.sourceforge.net/
Edit:
You could also try:
http://docs.oracle.com/javase/7/docs/api/java/net/Authenticator.html
I’m not sure if this works login forms, though.