aspose file tools*
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 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java HtmlUnit" Watch "Java HtmlUnit" New topic
Author

Java HtmlUnit

Ron Zavner
Greenhorn

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: http://aspose.com/file-tools
 
subject: Java HtmlUnit
 
Similar Threads
Tomcat 5 related question?
ADF MyFaces and HttpUnit testing
Error 500- Internal servlet error
DB2 DataSource
Error listenerStart : Using spring with tomcat