RPC call runs successfully in my localhost and when i pushed the project with phonegap integration and tested out in android emulator Rpc call fails and throws status exception 0 or gwt rpc Object not found-404
. I did refer tutorial from gwt phonegap rpc-Daniel and did changes like mentioned in above tut:
final ServiceDefTarget serv=(ServiceDefTarget)checkuser;
Window.alert(serv.getServiceEntryPoint());
PhonegapUtil.prepareService(serv,"http://myip:8888/plac/reg","reg");
Where plac
is my project space where it resides and reg
is URLPattern. I end up either with status code 0
exception or StatusCodeException 404 Notfound
.
Please let me know where I am wrong.
Web.xml:
<!-- Servlets -->
<servlet>
<servlet-name>Register</servlet-name>
<servlet-class>com.plac.server.Register</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Register</servlet-name>
<url-pattern>/plac/reg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Register</servlet-name>
<url-pattern>/plac/signup</url-pattern>
</servlet-mapping>