Sunday, December 20, 2015

Creating RemoteServiceServlet Programmatically

I have an application which works perfectly when I configured it via web.xml.  However, when I attempt to configure things programmatically I'm having issues with RemoteServiceServlet.

In particular, I'm creating a RemoteServiceDispatcher (from the gwtrpc-spring project). This is a very simple class that extends RemoteServiceServlet.  I'm using Spring's WebApplicationInitializer to configure the application and everything else appears to initialize properly.

When I attempt to load the page I get 404 errors. None of the methods in RemoteServiceServlet are invoked. I expected processCall to be called at least.

From what I understand, RemoteServiceServlet generates a lot of code dynamically; for instance, implementing doGet for all the RemoteService API calls.  It appears it must also add a mapping for the url-pattern "/*".

Can someone tell me if there is something I need to call on a RemoteServiceServlet object to have it do all the behind-the-scenes stuff?

Is there a difference between creating a RemoteSeviceServlet via the web.xml and just calling "new RemoteServiceServlet()" ?

thanks,
Mike

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment