No mapping found for HTTP request with URI [/webapp/] in DispatcherServlet with name 'SpringMVC'
可能有如下几个原因:
1、是否设置了web目录,在IDEA中,web目录是这样的

如果没有设置,按照下面的方法设置:
选中要设置的模块,点击file、project structure,设置web.xml文件和web目录的位置

2、DispatcherServlet的url-pattern

不能写成/*,因为会拦截动态页面的请求,连项目主页都访问不到。
如果写成/,要注意处理静态资源的访问问题,因为此时会拦截静态资源的请求,不处理就会404
No mapping found for HTTP request with URI [/webapp/] in DispatcherServlet with name 'SpringMVC'的更多相关文章
- 相对路径获取项目文件 及报错 No mapping found for HTTP request with URI XXX in DispatcherServlet with name ‘springmvc’解决方法
首先一点,WebRoot目录下的文件是都可以通过浏览器输入路径,直接读取到的 例如这样: 而WebRoot下面WEB-INF是无法浏览器输入路径直接读取的. 因为是受保护的. 如果jsp读取一个图片的 ...
- org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [XXX] in DispatcherServlet with name 'springMVC'
在web.xml中添加 <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern ...
- No mapping found for HTTP request with URI [/HelloWeb/] in DispatcherServlet with name 'HelloWeb' Spring MVC
I'm learning the Spring Framework, and I'm doing the HelloWeb tutorial on tutorialspoint, and I can' ...
- spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js...
问题:spring访问静态资源出错,No mapping found for HTTP request with URI xxx/resources/js/jquery.min.js... web.x ...
- springmvc No mapping found for HTTP request with URI in Dispatc
springmvc No mapping found for HTTP request with URI in Dispatc 博客分类: Java Web springmvcspring MVCNo ...
- SpringMvc出现No mapping found for HTTP request with URI的终极解决办法
No mapping found for HTTP request with URI 出现这个问题的原因是在web.xml中配置错了,如: <servlet> <servlet-na ...
- 问题 “No mapping found for HTTP request with URI [/rbiz4/uploadFile.html]” 的解决
从以前的SpringMVC项目简化一下做个例子,结果出现了下面的错误: No mapping found for HTTP request with URI [/rbiz4/uploadFile.ht ...
- No mapping found for HTTP request with URI [] in DispatcherServlet with name 'appServlet'
项目是使用SpringMVC (1)在浏览器中访问,后台总报错: No mapping found for HTTP request with URI [] in DispatcherServlet ...
- org.springframework.web.servlet.PageNotFound No mapping found for HTTP request with URI [/AssetRepair/assetRepairController/test.do] in DispatcherServlet with name 'assetrepair'
web.xml文件配置: xxx-servlet.xml 我们可以发现DispatcherServlet会处理"jsp"后缀的请求;而模型视图后缀也是jsp的 如果这样配置会报以下 ...
随机推荐
- python 垃圾回收
# 垃圾回收 # 小整数对象池 # a = 100# python对小整数的定义是[-5,257],这些证书对象是提前创建好的,不会被垃圾回收,再一个python的程序中,所有位于这个范围内的正式使用 ...
- 【第一部分】09Leetcode刷题
一.位1的个数 题目:191. Number of 1 Bits C++ Soution 1: class Solution { public: int hammingWeight(uint32_t ...
- 安装好ubuntu 18.10之后,屏幕一直在自动旋转,怎么办?
sudo apt-get install okular dia gimp Gparted sudo add-apt-repository universesudo apt install gnome- ...
- jdk1.8学习、jdk1.9学习、jdk10.0学习和总结
由于中文参考资料很少,参考链接: https://www.oschina.net/translate/109-new-features-in-jdk-10 http://chuansong.me/n/ ...
- c++ char数组形式的字符串 与输入输出
1. c风格字符串,和strlen函数 #include "stdafx.h" #include <iostream> using std::cout; using s ...
- 原 HTML5 requestFullScreen&exitFullscreen全屏兼容方案
摘要: html5 video全屏实现方式 首先来说,这个标题具有误导性,但这样设置改标题也是主要因为video使用的比较多 在html5中,全屏方法可以适用 ...
- MySQL事务提交过程(二)
上一篇文章我们介绍了在关闭binlog的情况下,事务提交的大概流程.之所以关闭binlog,是因为开启binlog后事务提交流程会变成两阶段提交,这里的两阶段提交并不涉及分布式事务,当然mysql把它 ...
- oracle数据入库出现空格问题
java做数据入库,不知为什么报如下图错误: debug发现数据是两位,如(FB),但是入库后发现FB后面多了两个空格,检查表发现类型声明是char(4),上网百度,说是char类型会自动补足.参考h ...
- P1135 奇怪的电梯 dp
题目描述 呵呵,有一天我做了一个梦,梦见了一种很奇怪的电梯.大楼的每一层楼都可以停电梯,而且第ii层楼(1 \le i \le N)(1≤i≤N)上有一个数字K_i(0 \le K_i \le N)K ...
- 052 kafka对topic的增删改查操作
一:create 1.开始使用命令 2.创建 bin/kafka-topics.sh --create --topic beifeng --zookeeper linux-hadoop01.ibeif ...