PDA

View Full Version : GWT RPC 404 error



cabster
12 Jan 2010, 2:25 PM
hello All,

After 3 days trying i don't know what to do anymore.
My PPC call is not working. i always receive a "POST http://localhost:8888/fnk/registermodule 404 Not Found".

Can anybody tell me what i'm doing wrong? I changed the web.xml file allot

here are my classes and files

IRegister class located at : modules.register.client.interfaces


@RemoteServiceRelativePath("registermodule")
public interface IRegister extends RemoteService {

public boolean insertNewUser(String userName, String passw, String passw2, String email);

}


IRegisterAsync class located at : modules.register.client.interfaces


public interface IRegisterAsync {
void insertNewUser(String userName, String passw, String passw2,
String email, AsyncCallback async);

}


Registerclass located at : modules.register.server



@SuppressWarnings("serial")
public class Register extends RemoteServiceServlet implements IRegister {

public Register() {
// TODO Auto-generated constructor stub
}



@Override
public boolean insertNewUser(String userName, String passw, String passw2,
String email) {

}
}


web.xml located at : /war/WEB-INF


<web-app>

<!-- Servlets -->
<servlet>
<servlet-name>RegisterModule</servlet-name>
<servlet-class>modules.register.server.Register</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>RegisterModule</servlet-name>
<url-pattern>/modules.register.register/registermodule</url-pattern>
</servlet-mapping>

<!-- Default page to serve -->
<welcome-file-list>
<welcome-file>Fnk.html</welcome-file>
</welcome-file-list>

</web-app>


register.gwt.xml localted at /modules


<module>
<inherits name="com.google.gwt.user.User" />
<inherits name="modules.main" />

<source path="register/client"/>
</module>

cabster
13 Jan 2010, 2:27 AM
Nobody seems to understand what is going on?

cabster
13 Jan 2010, 2:51 AM
I think i found the error.

the servlet url pattern was wrong

correct one:

<url-pattern>/register/registermodule</url-pattern>