解决 No mapping found for HTTP request with URI的方法
程序员文章站
2022-07-15 13:23:08
...
1、控制层没有被spring扫描到,控制层没有实例化,检查自己的控制层是否被spring扫描到,检查以下配置:
2、web.xml配置文件的标签配置成/*,正确的配置应该是/。学了structs之后再学spring mvc框架的 就会很容易犯这个错误。
3、使用的是注解实例化控制层,且web.xml的路径配置为/,却没有在spring的配置文件使用标签,导致URL解析出错,检查是否加上。
4试图解析器没有配置好
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
附上 组建扫描元素知识 http://blog.sina.com.cn/s/blog_57769b7b0100tt5x.html
上一篇: 飞得更高:(三)人不好招啊
下一篇: The method getJspApplicationContext(ServletContext) is undefined for the type Js
推荐阅读
-
php $_SERVER["REQUEST_URI"]获取值的通用解决方法
-
php错误提示failed to open stream: HTTP request failed!的完美解决方法
-
No mapping found for HTTP request with URI [/springmvc-1/springmvc/testParamsAndHeaders] in Dispatch
-
vue+No mapping found for HTTP request with URI [*//**] in DispatcherServlet with name ‘springMvc‘
-
异常记录二:寻求解决异常 !No mapping found for HTTP request with URI
-
如何解决“ No mapping found for HTTP request with URI [XXX] in DispatcherServlet with name 'XXX' ”
-
警告: No mapping found for HTTP request with URI [/springmvc-01/helloworld] in DispatcherServlet with
-
No mapping found for HTTP request with URI [/xxx/xxx] in DispatcherServlet with name 'xxx'
-
No mapping found for HTTP request with URI [...] in DispatcherServlet with name ‘DispatcherServlet‘
-
No mapping found for HTTP request with URI [***.html] in DispatcherServlet with name "***"