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

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: 980
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic