Hi,

I tried to create a sample application on RPC and built the war using
TomcatWarBuilder project (http://code.google.com/p/gwt-examples/wiki/
gwtTomcatWarBuilder) and deployed the war in Tomcat server. I have
also setup security.AllPermission in catalina.policy file as specfied
in http://code.google.com/p/gwt-examples/wiki/gwtTomcat. But I'm
getting 404 status error while the RPC call is made to server class. I
verified web.xml in the war as well gwt.xml and everything seems to be
good. I tried building test-gwt-MySQLConn project from SVN and got the
same error. Kindly help me to resolve this issue.

Here are the details.

OS: Windows
Tomcat : 6.0
jre : 1.6

Code snippets

ConnectionService.java
-----------------------------------
public interface ConnectionService extends RemoteService {
        public ApplicationModulesADT[] getApplicationModules();
}

ConnectionServiceAsync.java
------------------------------------------
public interface ConnectionServiceAsync {
        public void getApplicationModules(AsyncCallback callback);
}

ConnectionServiceImpl.java
---------------------------------------
public class ConnectionServiceImpl extends RemoteServiceServlet
implements ConnectionService {
        public ConnectionServiceImpl() {
        }

        public ApplicationModulesADT[] getApplicationModules() {

                ApplicationModulesImpl appModulesImpl = new 
ApplicationModulesImpl
();
                ApplicationModulesADT[] appModules =
appModulesImpl.getApplicationModules();

                return appModules;
        }
}

TestUI.gwt.xml
----------------------
<servlet path="/ConnectionService"
class="com.nce.qc.server.services.ConnectionServiceImpl"/>

RPC Call
----------------
private void rpcInit() {
        callProvider = (ConnectionServiceAsync) GWT.create
(ConnectionService.class);
        ServiceDefTarget target = (ServiceDefTarget) callProvider;

        // The path is determined in ./public/*.gwt.xml
        String moduleRelativeURL = GWT.getModuleBaseURL() +
"ConnectionService";
        //RootPanel.get().add(new HTML(moduleRelativeURL));
        target.setServiceEntryPoint(moduleRelativeURL);
    }

web.xml
-------------
<servlet>
  <servlet-name>TestUI</servlet-name>
  <servlet-class>com.nce.qc.server.services.ConnectionServiceImpl</
servlet-class>
  </servlet>
- <!--  url/path to servlet class and mapping
  -->
- <servlet-mapping>
  <servlet-name>TestUI</servlet-name>
  <url-pattern>/ConnectionService</url-pattern>
  </servlet-mapping>

catalina.policy
--------------------
grant codeBase "file:${catalina.home}/webapps/-" {
      permission java.net.SocketPermission "192.168.0.156:3306",
"connect";
};

grant codeBase "file:${catalina.home}/webapps/-" {
  permission java.security.AllPermission;
};

Error description
-----------------------
com.google.gwt.user.client.rpc.StatusCodeException:
HTTP Status 404 - /TestUI/ConnectionService
type Status report
message /TestUI/ConnectionService
description The requested resource (/TestUI/ConnectionService) is not
available.

Thanks in Advance,
Geeya.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to