• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

GWT deployment issue

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
....
 
Water! People swim in water! Even tiny ads swim in water:
Enterprise-grade Excel API for Java
https://products.aspose.com/cells/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!