Error 404 on GWT RPC

▼魔方 西西 提交于 2019-12-07 02:51:25

The problem seems to be that GWT isn't renaming the module before publishing, i you have a look at RemoteServiceRelativePath annotation documentation it defines the servlet path as GWT.getModuleBaseURL() + value(), being value() the value given to the annotation. One easy solution that might work would be to define the servlet mapping at the path the module is looking at.

Instead of:

<servlet-mapping>
  <servlet-name>MyTasksService</servlet-name>
  <url-pattern>/mytasks/taskAction</url-pattern>
</servlet-mapping>

Use:

<servlet-mapping>
  <servlet-name>MyTasksService</servlet-name>
  <url-pattern>/com.google.gwt.mytasks.MyTasks/taskAction</url-pattern>
</servlet-mapping>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!