In my GWT and AppEngine project, I’m forwarding a JSP in my Servlet using the following:
req.getRequestDispatcher("/index.jsp").forward(req, resp);
The JSP contains a the GWT compiled Javascript reference.
The problem is that even though the page loads fine, the GWT Javascript doesn’t run. I’m assuming this is because the newly loading file doesn’t include the ?gwt.codesvr=127.0.0.1:9997 part that would normally be there with the GWT Plugin.
Is there a way to get this working ??
EDIT: Based on the answers so far, I think I should mention that it works absolutely fine in Web mode. Also, the base URL maps directly to the Servlet in my Web.xml so I access the Servlet at http://127.0.0.1:8888/ instead of the proposed URL at http://127.0.0.1:8888/index.html?gwt.codesvr=127.0.0.1:9997
The
?gwt.codesvr=is used on the client side only, by the*.nocache.jsfile, to trigger the load ofhosted.htmlinstead of some*.cache.html, so it must be present in the URL to trigger DevMode, independently of what can be done on the server side.If your host page is at
http://127.0.0.1:8888/, then usehttp://127.0.0.1:8888/?gwt.codesvr=127.0.0.1:9997.