views:

58

answers:

2

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  A: 

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.

David Underhill
I have ead this....but i can't understand how to apply that patch...They have submitted .diff files
usman raza
to use them.Any guidelines????
usman raza
read* typo error :)
usman raza
A: 

I am under the impression that HtmlUnit 2.8 should work.

What version do you use?

Ahmed Ashour
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
Please post your minimal app to htmlunit user list, others can help
Ahmed Ashour