大家好,我正在開發covoiturage應用程序,並且頁面之間的導航有問題。當我點擊一個鏈接轉到頁花葯我有問題「的映射關係,發現在DispatcherServlet的名稱爲MVC的調度程序URI http請求」 謝謝Spring MVC URL映射問題
<annotation-driven />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="com.covoiturage.app" />
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
org.springframework.web.context .ContextLoaderListener
請編輯您的問題,並把代碼FR在那裏激動。包含堆棧跟蹤,如果有的話。 –
當我點擊一個鏈接,我總是警告:org.springframework.web.servlet.PageNotFound - 沒有找到映射找到URI的HTTP請求[/應用程序/登錄]在名爲'appServlet'的DispatcherServlet' – user0321