0

I'm trying to use HtmlUnit to get DOM of webpages. However, when I try to run this code on app engine development server (using the eclipse plugin):

WebClient wc=new WebClient();
HtmlPage page1= wc.getPage("http://ww.google.com/");

I get this exception:

java.net.URLStreamHandler is a restricted class.

Is it not possible to use HtmlUnit on app engine?

1

2 Answers 2

1

No, HtmlUnit will not work in the app engine sandbox at this time.

However, a patch for HtmlUnit to work on GAE is in progress. HtmlUnit's bug tracker issue 2962074 discusses making HtmlUnit work on GAE, and provides a preliminary patch for accomplishing this.

1
  • I have ead this....but i can't understand how to apply that patch...They have submitted .diff files
    – usman raza
    Commented Oct 5, 2010 at 9:01
0

I am under the impression that HtmlUnit 2.8 should work.

What version do you use?

2
  • im using HtmlUnit 2.8 but still im facing same problem. im unable to understand Sourceforge solution. and please add me on msn . my id is [email protected]
    – usman raza
    Commented Oct 5, 2010 at 9:03
  • Please post your minimal app to htmlunit user list, others can help Commented Oct 7, 2010 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.