This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

login to a https website using java code

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am running java 1.8 under 64 bit windows 7, using the code below I failed to log in, I am getting the log in page but not being logged in.

Would you please help . Many Thanks


 
lowercase baba
Posts: 13024
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What makes you think there is a problem? How do you know you are not being logged in? Is there an error message? what exactly DOES happen?

My larger point is that you need to TellTheDetails. We can't duplicate your problem, and you've removed the URL, ID and PW (which I don't blame you for doing). So from where we are sitting, it could be a wrong, URL, it could be a wrong password, or about a million other things. Help us help you.
 
sam jesse
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The reason I think I am not logged in is that the page I receive is the same log in page where it asks for the log in username and password and not the "welcome" page where I see my name "confirming that I am logged in".

I made up a muck account in an online forum for testing.
https://www.sydneyforum.com/login
samjesse
123
 
Ranch Hand
Posts: 121
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Sam.

I suggest using an HTTP monitoring tool. For example, you may use a developer console in Firefox or Chrome. You could see an actual request made by the browser.

As to your problem. You are trying to use HTTP basic authentication. But the site passes login and password as form parameters in the POST request. It also passes other parameters which may or may not matter. You should match browser request as closely as possible first and then you could remove all non-necessary parts from it.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic