title: GWT Guice + RPC Service getting 404 Not Found
body: <p>I am getting a 404 Not found Exception when my service is being accessed...I'm adding a very simple servlet to a GWT Guice webapp...I'm using RPC for my servlet implementation. </p>
  
  <p>**Update (I'm still getting the same problems below with my changes): I realized I may need a binding in the ServletModule class, so I added this:</p>
  
  <pre><code>protected void configureServlets() {
      bind(BCDWebImpl.class).in(Singleton.class);
      serve("/a-bcd/abcd/bcdWebUtil").with(BCDWebImpl.class);
  </code></pre>
  
  <p>I also added a Window.alert(GWT.getModuleBaseURL()) to my code, this outputs:</p>
  
  <pre><code>http://xx.xx.xx.xx:8080/a-bcd/abcd/
  </code></pre>
  
  <p>This is the output I'm getting from firebug:</p>
  
  <pre><code>Request Headersview source
  Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Encoding gzip, deflate
  Accept-Language en-US,en;q=0.5
  Authorization   Basic YWxsVXNlcjpwYXNzd29yZA==
  Cache-Control   no-cache
  Connection  keep-alive
  Content-Length  148
  Content-Type    text/x-gwt-rpc; charset=utf-8
  Cookie  JSESSIONID=97FA0BE47F77E170C18B105C509F980D
  Host    xx.xx.xx.xx:8080
  Pragma  no-cache
  Referer http://xx.xx.xx.xx:8080/a-bcd/
  User-Agent  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0
  X-GWT-Module-Base   http://xx.xx.xx.xx:8080/a-bcd/abcd/
  X-GWT-Permutation   35D972F27B5773A4C5ACAFE8EA5C1F36
  </code></pre>
  
  <p>Here is my web.xml:</p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;guiceFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;com.google.inject.servlet.GuiceFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;guiceFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;BCDWebImpl&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.pz.abcd.server.rest.BCDWebImpl&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;BCDWebImpl&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/a-bcd/abcd/BCDWeb&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>BCDWeb Class:</p>
  
  <pre><code>@RemoteServiceRelativePath("bcdWeb")
  public interface BCDWeb extends RemoteService
  {
    public String getName ();
  }
  </code></pre>
  
  <p>gwt.xml:</p>
  
  <pre><code>&lt;module rename-to='abcd'&gt;
      &lt;servlet class="com.pz.abcd.server.rest.BCDWebImpl" path="/bcdWeb" /&gt;
  </code></pre>
  
  <p>BCDEntryPoint.java: </p>
  
  <pre><code>public void onModuleLoad() {
      // This is required for Gwt-Platform proxy's generator
      DelayedBindRegistry.bind(ginjector);        
  
      ginjector.getPlaceManager().revealCurrentPlace();
      setUpEnv();
  
  }
  
  private void setUpEnv(){
      BCDWebAsync web = GWT.create(BCDWeb.class);
      ServiceDefTarget endpoint = (ServiceDefTarget)web;
      endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() + "bcdWeb");
      web.getName(new AsyncCallback&lt;String&gt;() {
  
          @Override
          public void onFailure(Throwable caught) {
              GWT.log(caught.getMessage());
          }
  
          @Override
          public void onSuccess(final String name) {
              // do something here;  
          }
      });
  }
  </code></pre>
  
  <p>Again, this webapp is using guice, but I'm trying to add on a very simple RPC servlet...any ideas what could be the problem??</p>
  
  <p>Thanks in advance. </p>