Sorry I didn't get a chance to respond to this sooner, really busy
lately ;).
Yes, you can add regular servlets normally, just put then in your
SOURCE web.xml and away you go. (Don't put them in the module as you
note.) As an aside to this, one other thing I would mention here - in
general I probably would not even package my REST impl along with my
GWT code. Just make it a separate project on it's own completely
independent of GWT stuff (it's own WAR, etc - mock it for tests at the
GWT level, at deploy time the service calls just go to that server
impl).
> - I created a server directory as sibling to client directory
>
> src/main/java/com/acme/server
> src/main/java/com/acme/client
>
> - I added dependencies to my server side code which I needed to implement
> my REST service
> - I updated my web.xml file to add my custom SpringServlet (does not
> extends GWT RemoteServiceServlet)
>
> <servlet>
> <servlet-name>REST Interface</servlet-name>
> <servlet-class>com.acme.RESTServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>REST Interface</servlet-name>
> <url-pattern>/rest/*</url-pattern>
> </servlet-mapping>
>
> - Made sure to not add that (non- GWT RemoteServiceServlet) servlet to my
> Application.gwt.xml module descriptor file.
> I learned the hard way that you only list GWT RemoteServiceServlet
> extensions here.
> - When I run my app in the GWT Shell I can access the servlet at:
>
>
http://localhost:8888/rest/xxx
>
> The servlet can be accessed within the client code at a relative URL
> like:
>
> String urlPath = GWT.getModuleBaseURL() + "../rest/xxx";
>
> Hope this helps others in my situation.
>