Hi all,
I have written a GWT application. What happens is that everything works fine in the hosted mode. When I deploy, I get the html up with all the widgets, but the widgets that are supposed to be populated through the rpc mechanism are not. I strongly believe at this point that my
servlet mapping is somehow incorrect, but I have tried lots of different things and nothing seems to be able to fix my problem. I was hoping if someone can look at the following information and point me to where the problem might be.
My web.xml has:
<servlet>
<servlet-name>AssociationServlet</servlet-name>
<servlet-class>gwtView.server.AssociationServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AssociationServlet</servlet-name>
<url-pattern>/www/gwtView.test/AssociationServlet</url-pattern>
</servlet-mapping>
My test.gwt.xml has:
<servlet path="/AssociationServlet"
class="gwtView.server.AssociationServlet" />
This is how I am setting the url for the service inside my
Java file:
IncidentAssociationsServiceAsync getIncidentAssociationsService =
(IncidentAssociationsServiceAsync) GWT.create(IncidentAssociationsService.class);
ServiceDefTarget target = (ServiceDefTarget) getIncidentAssociationsService;
String relativeUrl = GWT.getModuleBaseURL() + "/AssociationServlet";
target.setServiceEntryPoint(relativeUrl);
And finally this is my directory structure:
WEB-INF
....src
........gwtView
............test.gwt.xml
............client
................IncidentAssociationsService.java
................IncidentAssociationsServiceAsync.java
................IncidentAssociationView.java
............server
.................AssociationServlet.java
............public
................IncidentAssociationView.html
www
.....gwtView.test
....cache.js
....css
....