The RPC I implemented works fine in dev mode. But as soon as I copy the code into a real apache server the RPC stops working! How do you configure your GWT application so that the RPC will work on the apache server? I have found the GWT tutorial on RPC but it is not very helpful. Other links about RPC configuration would be very much appreciated!
I developed some GWT code. I implemented and got working an RPC client-server communication. When I say it is working... I mean that it works great in development mode. I can click and it interacts with the server as expected.
Then when I do a GWT compile and copy the war directory into my apache server htdocs folder. I can view the website but when I click on the button that is supposed to initiate an RPC nothing happens. I check the Firefox-->tools-->web console and see "NAMEOFRPC 404 not found".
Here is my WEB-INF web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<!-- Servlets -->
<servlet>
<servlet-name>NameOfRpc</servlet-name>
<servlet-class>com.company.nameOfModule.server.rpc.NameOfRpcImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>NameOfRpc</servlet-name>
<url-pattern>/nameOfModule</url-pattern>
</servlet-mapping>
<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>NameOfModule.html</welcome-file>
</welcome-file-list>
</web-app>
Here is the firefox web-console error I get:
[16:50:58.792] POST http://SERVER/gwt/nameOfModule/nameOfModule/NameOfRpc [HTTP/1.1 404 Not Found 3065ms]
I copy the war folder into /SERVER/gwt and then rename it to nameOfModule.
Is there anything wrong with my WEB-INF/web.xml?