File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java HtmlUnit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java HtmlUnit" Watch "Java HtmlUnit" New topic

Java HtmlUnit

Ron Zavner

Joined: Nov 28, 2010
Posts: 20
Hi, I'm trying to use HtmlUnit to login to my local wordpress website but it seems to have a cookies issue.

That's that begining of the code:

WebClient webClient = new WebClient();
HtmlPage loginPage = webClient.getPage("http://localhost/flowersWp/wp-admin");
HtmlForm form = loginPage.getFormByName("loginform");

Nov 27, 2010 12:43:35 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies WARNING: Cookie rejected: "[version: 0][name: wordpress_2418eeb845ebfb96f6f1a71ab8c5625a][value: +][domain: localhost][path: /flowersWp/wp-admin][expiry: Fri Nov 27 12:43:35 IST 2009]". Illegal path attribute "/flowersWp/wp-admin". Path of origin: "/flowersWp/wp-login.php"

That's what I get in the log. Anyone has an idea? Thanks.
I agree. Here's the link:
subject: Java HtmlUnit
It's not a secret anymore!