2015-08-25 51 views
-3

servlet映射ViewRendererServlet指的是沒有定義的web.xmlservlet映射ViewRendererServlet可見是指沒有定義一個servlet t web.xml中

<?xml version="1.0" encoding="UTF-8"?> 
<web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> 
<display-name>NWRedirectPortlet</display-name> 
<context-param> 
    <param-name>contextConfigLocation</param-name> 
    <param-value>/WEB-INF/context/applicationContext.xml</param-value> 
</context-param> 
<listener> 
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
</listener> 
<servlet> 
    <servlet-name>ViewRendererServlet</servlet-name> 
    <servlet-class>org.springframework.web.servlet.ViewRendererServlet</servlet-class> 
</servlet> 

<servlet-mapping> 
    <servlet-name>ViewRendererServlet</servlet-name> 
    <url-pattern>/WEB-INF/servlet/view</url-pattern> 
</servlet-mapping> 

+0

歡迎堆棧溢出!我已經修復了您的問題的格式。我們真的需要更多信息。你的問題是什麼?你想解決什麼問題?請在問題中進一步解釋你正在嘗試做什麼。然後有人可以幫忙。 –

回答

0

它的抱怨,因爲你不一個servlet 「T有其中之一的web.xml

<servlet> 
    <servlet-name>ViewRendererServlet</servlet-name> 
    <servlet-class>com.example.MyClass</servlet-class> 
    ... 
</servlet> 

更新

<servlet><servlet-mapping>是兄弟:

<servlet> 
    <servlet-name>ViewRendererServlet</servlet-name> 
    <servlet-class>org.springframework.web.servlet.ViewRendererServlet</servlet-class> 
</servlet> 

<servlet-mapping> 
    <servlet-name>ViewRendererServlet</servlet-name> 
    <url-pattern>/WEB-INF/servlet/view</url-pattern> 
</servlet-mapping> 
+0

我有中的 org.springframework.web.servlet.ViewRendererServlet

+0

''必須與'在'' Andreas

+0

\t \t ViewRendererServlet可見 \t \t org.springframework.web.servlet.ViewRendererServlet \t \t \t \t \t ViewRendererServlet \t \t /WEB-INF/servlet的/視圖 \t \t \t