1.通过在网上搜索,我了解到要将 spring 与 gwt 一起使用,我必须将默认 DispatcherServlet 替换为 org.spring4gwt.server.SpringGwtRemoteServiceServlet 。但是我看到的所有geomajas(使用spring + gwt)示例实际上都使用了应该被替换的DispatcherServlet。我怎么也能这样做?.
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Geomajas application</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
<!-- framework context -->
classpath:org/geomajas/spring/geomajasContext.xml
<!-- use rasterizing -->
classpath:org/geomajas/plugin/rasterizing/DefaultRasterizedPipelines.xml
<!-- application context -->
WEB-INF/applicationContext.xml
WEB-INF/layerOsm.xml
WEB-INF/mapOsm.xml
</param-value>
</context-param>
<filter>
<filter-name>CacheFilter</filter-name>
<filter-class>org.geomajas.servlet.CacheFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CacheFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
<!-- only needed for direct GWT -->
<listener>
<listener-class>org.geomajas.servlet.PrepareScanningContextListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:META-INF/geomajasWebContext.xml</param-value>
<description>Spring Web-MVC specific (additional) context files.</description>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/d/*</url-pattern>
<url-pattern>/${artifactId}/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
- 我必须对上述文件进行哪些修改才能添加另一个 spring 管理的 servlet?