An edit: I also checked that in the servlet filter the url http://localhost:8080/?_escaped_fragment_=Contact
gets transformed into http://localhost:8080/#!Contact and that htmlunit is invoked with this url. On Apr 7, 12:05 pm, Paul van Hoven <[email protected]> wrote: > I successfully made my gwt app crawlable following the official Google > guide athttps://developers.google.com/webmasters/ajax-crawling/ > > Now, I got a startpage that is invoked with the historytoken #! > Startpage and I got a contact form that is invoked by #!Contact. > > Here is my on module load function: > > public void onModuleLoad() { > > // I commented this so that I get an empty inital window > //RootPanel.get("application_div").add( new StartWidget() ); > > //do some stuff and add history support > > History.newItem( History.getToken() ); > > } > > Now, if I call my page like this > > http://localhost:8080 > > I get an empty page, as expected! But when calling the page like this > > http://localhost:8080#!Startpage > > I get the startpage. And with > > http://localhost:8080/#!Contact > > I get the contact form. So I checked that this works. > > Now to the crawling part: > I installed a servlet filter in my tomcat and use this code > > http://code.google.com/p/gwt-platform/source/browse/src/com/philbeaud... > > as the filter object. It uses htmlunit to render the page on server > side and then it sends pure html to the client. This works as follows: > > http://localhost:8080/?_escaped_fragment_=Contact > > The _escaped_fragment_ invokes the htmlunit part in the filter object > and the page gets rendered as described in the offical Google guide > ajax crawling document:https://developers.google.com/webmasters/ajax-crawling/ > > The problem is that > > http://localhost:8080/?_escaped_fragment_=Contact > > yields a empty page just as if there was no history token. This means > that the htmlunit in the code completly ignores the history token and > just loads an empty page. > > What is going wrong and why does htmlunit not invoke the history? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
