Re: Why do I have java.util.EmptyStackException when using HTMLUnit to render the page via Filter?

2014-05-16 Thread Tom
It seems that after opened the url http://127.0.0.1:/Myproject.html?gwt.codesvr=127.0.0.1:9997?_escaped_fragment_=article, I can see the Chrome browser show the raw html page like this This XML file does not appear to have any style information associated with it. The document tree is show

Re: Why do I have java.util.EmptyStackException when using HTMLUnit to render the page via Filter?

2014-05-15 Thread Tom
i found this link http://htmlunit.10904.n7.nabble.com/htmlunit-Bugs-1728761-java-util-EmptyStackException-in-webclient-td4900.html Maybe this causing the problem: !stack.empy() && stack.peek() .. stack.peek() is the one throwing this > exception. May be that, when the current thread has checked

Why do I have java.util.EmptyStackException when using HTMLUnit to render the page via Filter?

2014-05-15 Thread Tom
Ok, I have a Filter public class CrawlServlet implements Filter{ @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; St