user3517373
user3517373

Reputation: 1

Error in Call RPC - GWT , 404 the server responded with a status of 404 (Not Found)

I deploy my GWT app on a server, in dev mode, with eclipse.
The RPC calls works fine, but after i deploy to a tomcat sever, i can't do the calls. Here is whats the console of the browser shows :

Failed to load resource: the server responded with a status of 404 (Not Found) http://greenti.platon.com.br/war2/softheart/adminService Failed to load resource: the server responded with a status of 404 (Not Found)

here is my web.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
  http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  version="2.5"
  xmlns="http://java.sun.com/xml/ns/javaee">

  <!-- Default page to serve -->   
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>   
  </welcome-file-list>
<servlet>
  <servlet-name>adminService</servlet-name>
  <servlet-class>greenti.server.service.AdminServiceImpl</servlet-class>
</servlet>

<servlet-mapping>
  <servlet-name>adminService</servlet-name>
  <url-pattern>/softheart/adminService</url-pattern>
</servlet-mapping>
</web-app>

My class Service:

@RemoteServiceRelativePath("adminService")
public interface AdminService extends RemoteService{
  ...
}

My .gwt.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  When updating your version of GWT, you should also update this DTD reference,
  so that your app can take advantage of the latest GWT module capabilities.
-->
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
  "http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-module.dtd">
<module rename-to='softheart'>
  <!-- Inherit the core Web Toolkit stuff. -->
  <inherits name='com.google.gwt.user.User'/>

  <!-- Inherit the default GWT style sheet.  You can change       -->
  <!-- the theme of your GWT application by uncommenting          -->
  <!-- any one of the following lines.                            -->

  <inherits name='com.google.gwt.user.theme.clean.Clean'/>
  <!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
  <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
  <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->

  <!-- Other module inherits                                      -->

  <!-- Specify the app entry point class.                         -->
  <entry-point class='greenti.client.view.PanelMain'/>

  <!-- Specify the paths for translatable code                    -->
  <source path='client'/>
  <source path='shared'/>

</module>

Any help would be appreciated

Upvotes: 0

Views: 1442

Answers (2)

somesh
somesh

Reputation: 2579

As Andrei suggested, don't use war2 in your url.

Alternatively you can change the url-pattern in servelt-mapping of web.xml to /war2/softheart/adminService, if you want to persist with the same url.

Upvotes: 0

Andrei Volgin
Andrei Volgin

Reputation: 41089

Try:

http://greenti.platon.com.br/softheart/adminService

I am not sure why you use /war2/ in your path.

Upvotes: 1

Related Questions