2014-06-28 29 views
0

我想GWT和Spring使用库spring4gwt-0.0.1.jar整合,但出现以下错误未知的servlet名称:servlet映射指定当使用spring4gwt库

Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name springGwtRemoteServiceServlet 
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3275) 
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3254) 
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1430) 
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1344) 
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876) 
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374) 
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) 
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) 
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355) 
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
... 6 more 

我的网页。 xml

<?xml version="1.0" encoding="ISO-8859-1"?> 
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xmlns="http://java.sun.com/xml/ns/javaee" 
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
     id="WebApp_ID" version="2.5"> 

    <display-name>TelephoneBook</display-name> 

    <context-param> 
     <param-name>contextConfigLocation</param-name> 
     <param-value>classpath:spring/application-config.xml</param-value> 
    </context-param> 

    <listener> 
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
    </listener>  

    <servlet> 
     <servlet-name>springGwtRemoteServiceServlet</servlet-name> 
     <servlet-class>org.spring4gwt.server.SpringGwtRemoteServiceServlet</servlet-class> 
     <load-on-startup>1</load-on-startup> 
    </servlet> 

    <servlet-mapping> 
     <servlet-name>>springGwtRemoteServiceServlet</servlet-name> 
     <url-pattern>/TelephoneBook/springGwtServices/*</url-pattern> 
    </servlet-mapping> 

    <welcome-file-list> 
     <welcome-file>TelephoneBook.html</welcome-file> 
    </welcome-file-list> 

</web-app> 

这是怎么回事?提前致谢!

+0

正是!我怎么可能没有注意到?非常感谢! – dmitriygg

回答

0

Here <servlet-name>>springGwtRemoteServiceServlet</servlet-name>你有一个>很多。它是一个复制PASE错误? (开始servlet-name标记后

+0

正好!我怎么没有注意到?非常感谢! – dmitriygg