GWT RPC Service not found

主宰稳场 提交于 2019-12-07 06:54:29

Have you tried removing /kuss_projekt from servlet mapping to make it:

<servlet-mapping>
    <servlet-name>SpeicherService</servlet-name>
    <url-pattern>/SpeicherService</url-pattern>
</servlet-mapping>

GWT client is expecting the service to be available at the URL defined via @RemoteServiceRelativePath. When you are running in browser, the path is resolved relative to your module base url. As you have given:

@RemoteServiceRelativePath("SpeicherService")

the client will make request to the URL made by concatenating

GWT.getModuleBaseURL() + "SpeicherService"

If your servlet is not mapped at this url, the request will fail. Try printing GWT.getModuleBaseURL()+ "SpeicherService" on console to see what is the base url in your test case. Once you have got this, open the browser and go to that url. If the response says something like "Get method is not supported" everything is mapped correctly. On the other hand if you get a 404 you got to fix your servlet mapping

Does your application xml file contain

<module rename-to='kuss_projekt'>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!