我已将 maven 项目提交给 svn 它在我的机器上运行,但是当其他人导入该 maven 项目时,它们会出现异常:
Module声明了一个servlet类.......,但是web.xml没有对应的映射;请将以下几行添加到您的 web.xml
这个类属于我的项目使用的库。我不明白有什么问题。请帮我。
模块.gwt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='engile'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<inherits name="com.google.gwt.inject.Inject" />
<inherits name="com.appops.ui.basic.Fields" />
<inherits name='com.mvp4g.Mvp4gModule' />
<inherits name="gwtupload.GWTUpload"/>
<inherits name='com.google.api.gwt.oauth2.OAuth2'/>
<inherits name="com.google.gwt.xml.XML"/>
<inherits name="org.atmosphere.gwt.Client"/>
<!-- Logger at client side -->
<inherits name = "com.google.gwt.logging.Logging"/>
<set-property name="gwt.logging.enabled" value="TRUE"/>
<set-property name="gwt.logging.logLevel" value="INFO"/>
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
<set-property name="gwt.logging.simpleRemoteHandler" value="ENABLED" />
<!-- Specify the app entry point class. -->
<entry-point class='com.engile.client.Engile'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
<source path='shared'/>
<!-- <set-property name="user.agent" value="safari"/>
<set-property name="user.agent" value="gecko1_8"/> -->
</module>
网页.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<filter>
<filter-name>guiceFilter</filter-name>
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>guiceFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>com.engile.server.guice.BootstrapListener</listener-class>
</listener>
<servlet>
<description>AtmosphereServlet</description>
<servlet-name>AtmosphereServlet</servlet-name>
<servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
<init-param>
<param-name>org.atmosphere.disableOnStateEvent</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>org.atmosphere.cpr.AtmosphereHandler</param-name>
<param-value>com.engile.server.services.AtmosphereHandler</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AtmosphereServlet</servlet-name>
<url-pattern>/engile/gwtComet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>remoteLoggingService</servlet-name>
<servlet-class>com.google.gwt.logging.server.RemoteLoggingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>remoteLoggingService</servlet-name>
<url-pattern>/engile/remote_logging</url-pattern>
</servlet-mapping>
<!-- <servlet>
<servlet-name>testImpl</servlet-name>
<servlet-class>com.appops.server.TestImpl</servlet-class> </servlet>
<servlet-mapping> <servlet-name>testImpl</servlet-name>
<url-pattern>/engile/test</url-pattern>
</servlet-mapping> -->
<welcome-file-list>
<welcome-file>Engile.html</welcome-file>
</welcome-file-list>
</web-app>