• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Using Java to Login to an HTTPS Website (Yahoo)

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm interested in making a program to log into yahoo.com and check my various stock portfolios. I already know how to access static web pages in Java, but this poses a unique challenge because it requires cookies and it uses SSH authentication (the https protocol). Does anyone have any tips on how I can get this to work, or know any helpful resources? I believe YPOPs (YPOPs does something similar (log in to Yahoo programatically), but their forums are pretty much dead. My biggest question right now is how I might accept cookies in Java so I can move around yahoo in a logged in state. Any ideas?

Thanks,
Parth
 
Ranch Hand
Posts: 982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i heard something about watij / httpunit...but these are basically used for functioanl web testing
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using the networking classes in the standard Java API? They work but are not so sophisticated and doing things like HTTPS and cookies can be difficult or isn't even possible with the standard API classes.

Have a look at Jakarta Commons HttpClient, which is a library that makes working with HTTP and HTTPS a lot easier. This library can also handle cookies for you.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please do not post the same question to multiple forums. Now you have answers here and here, and peoples time and effort to help you is being duplicated and thus wasted: CarefullyChooseOneForum
 
A day job? In an office? My worst nightmare! Comfort me tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic