Using HTMLUnit on a webpage generated by a servlet
问题 How could I use HTMLUnit to get data from a webpage generated by a java servlet. I keep getting an error when I try to read the webpage. /getSurvey is the servlet that creates the webpage but how can I access the HTML generated from the servlet. final WebClient webClient = new WebClient(); final HtmlPage page = webClient.getPage("http://survey-creator.appspot.com/getSurvey"); 回答1: HtmlUnit is not really "just" a HTML parser. It's kind of a programmatic webbrowser. It's intented to surf