rsimon
oläst,13 jan. 2011 07:28:182011-01-13Logga in om du vill svara författaren
Logga in om du vill vidarebefordra
Du har inte behörighet att radera meddelanden i den här gruppen
Visa det ursprungliga meddelandet
Antingen är e-postadresser anonyma för den här gruppen eller behöver du ha behörigheten visa medlemmars e-postadresser för att visa det ursprungliga meddelandet
till Google Web Toolkit
Dear all,
I have a project which consists of multiple modules. Basically, it's
four separate GWT applications which share some common code. There's a
separate module for each of the four applications, plus a 'core'
module for the common functionality.
Now my problem: The common functionality includes server-side RPC
endpoints. I have defined the servlet paths for those endpoints in
the .gwt.xml file of my core module as
<servlet path='/endpointA' class="..."/>
<servlet path='/endpointB' class="..."/>
and so on. Now - when I inherit the core module in my app modules, GWT
insists that the endpoints are mapped to
"/<AppName>/endpointA" rather than just "/endpointA"
So far so good. But as a result, I need to provide 4 servlet mappings
in my web.xml, each pointing to the same service impl class. E.g.
something like this:
<servlet>
<servlet-name>endpointA<servlet-name>
<servlet-class>my.gwtapp.server.EndpointAServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>endpointA</servlet-name>
<url-pattern>/AppOne/endpointA</url-pattern>
<url-pattern>/AppTwo/endpointA</url-pattern>
<url-pattern>/AppThree/endpointA</url-pattern>
<url-pattern>/AppFour/endpointA</url-pattern>
</servlet-mapping>
Ok, it's not a showstopper. But I can't believe there's no better way
to share servlets across modules than by repeating the mappings for
each module?
Any advice appreciated!