• 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

HttpClient login, search and get the HTML content

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I want to login to a site using HttpClient and after logging in I want to search in the HTML content and retrieve the contents of the search result.



when I print the output from HttpEntity it's printing the login page contents. How do I get the contents of the page after I login using HttpClient?
I tried couple of other sites and it worked for me, but not for mint.com please help
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could use an HTTP monitor to see how the request differs between logging in via the web site, and logging in via HttpClient.

If this was my problem I'd use HtmlUnit instead of HttpClient, as it has a higher-level API for dealing with programmatic web access.
 
Danny Sater
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:You could use an HTTP monitor to see how the request differs between logging in via the web site, and logging in via HttpClient.

If this was my problem I'd use HtmlUnit instead of HttpClient, as it has a higher-level API for dealing with programmatic web access.



Thank you for this information... I'm still wondering why my code work for some sites and not for others ... Thanks in advance.
 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It all depends on the SSL security mechanism being used.

This is a fragment I wrote:


That may help or point you in the correct direction.

WP
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic