1) Installed GWT and Eclipse on Mac
2) Created a GWT project (2.4) with generated code called Hello
3) Ran the project on local computer (in dev mode) and it works as expected.
4) Compile the project and upload the war directory to my account hosted by serversanddomains.com
- The production front end works fine, but when I try the RPC request I get the following error.
com.google.gwt.user.client.rpc.StatusCodeException: 404 Not Found The requested URL /hello/greet was not found on this server.
I tried compiling with different versions of java as suggest by How to use GWT - RPC to Tomcat server
Serversanddomains.com currently runs Tomcat and java 1.6.0_29
I asked to see the error log and they responded Here is the error we are seeing in the error log: File does not exist: /home/username/public_html/hello/greet, referer: http://mydomain.com/Hello.html And in the /usr/local/jakarta/tomcat/logs/catalina.out log file no reports of anything.
My web.xml file is:
<?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">
<!-- Servlets -->
<servlet>
<servlet-name>greetServlet</servlet-name>
<servlet-class>com.hello.server.GreetingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>greetServlet</servlet-name>
<url-pattern>/hello/greet</url-pattern>
</servlet-mapping>
<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>Hello.html</welcome-file>
</welcome-file-list>
</web-app>
Any suggests would be welcome.
Cheers