Win a copy of Head First Android this week in the Android forum!

Pedro Ivo

Greenhorn
+ Follow
since Oct 23, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Pedro Ivo

Ulf Dittmer wrote:My favored approach to programmatic web access is HtmlUnit rather than HttpComponents - the API is more full-featured. But HttpComponents should be up to the job.



Hi, thank's for your answer...i tried that request with HtmlUnit and had the same response from server...he redirect me to a page requesting enabled cookies.
But i read something about the "BROWSER_COMPATIBILITY" in "Cookies Policy" and i found that about change HtmlUnit Cookies Policy to "ACCEPT ALL COOKIES" instead "BROWSER COMPATIBILITY"...but i didn't understood how do this...

Can someone show me a step by step of how i can do this?

http://stackoverflow.com/questions/4681772/cookie-policy-in-htmlunit

Tim Holloway wrote:I don't know if that's an option, since you seem to be dipping into fine-tuning of the SSL configuration, which is something I don't normally do - I just let client and server negotiate automatically, just as they do in web browsers.



Don't worry about SSL configuration...just show me a simple way...
Can you show me a example where i do a post request, and then a request to another page (where i need logged status) to print their source code? I can't found a way to do without Apache API...
Now that you said, watching web flow through HttpFox when i log in, show the cookie JSESSIONID at the header "Cookie" instead "Set-Cookie" showed by API. That's maybe a problem? And if it's, is possible set API to save cookies in another header but "Set-Cookie"?
That's the point.
I couldn't do another request; the first response isn't a logged page, it's a warning page about disabled cookies.
Hello guys,

I'm developing an app to do a POST log in on a server and access another page (who need logged status) to use those information.
The code:



I can submit the POST request (going through security certificates), but the servlet who redirects, tells me that i need enable cookies to log in.
Analyzing the returned headers from method, that API store the cookies in headers named "Set-Cookie", so i suppose that cookies are enabled.

Can anyone help me with that?