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的 如果这样配置会报以下 ...
随机推荐
- AI学习吧-Redis操作-事务、订阅
事务 #首先启动redis服务端和客户端:#关于事务,数据库中的事务指的是逻辑上的一组操作,这组操作要么都执行成功要么不执行成功,出现异常会回滚到初始状态. 在代码中加入xxx,代码报错的话,不会执行 ...
- Two Sum【LeetCode】
Given an array of integers, return indices of the two numbers such that they add up to a specific ta ...
- KnockOut -- 快速入门
简单示例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf- ...
- [转] mongoose学习笔记(超详细)
名词解释 Schema: 一种以文件形式存储的数据库模型骨架,不具备数据库的操作能力 Model: 由Schema编译而成的假想(fancy)构造器,具有抽象属性和行为.Model的每一个实例(ins ...
- kickstart-G
感觉自己很蠢,large数据只能交一次,忘记这回事了 A题 O(n^2)解法,用vector<set> 缓存j后面的数据,减少一重循环 #include <string> #i ...
- DataFrames和Kudu
Kudu为Kudu表提供了一个自定义的原生数据源.可以和DataFrame API紧密集成: 使用DataFrame的好处就是可以从很多的数据源创建dataframe,包括现有的RDD,Hive表或S ...
- springboot 传List参数
最近项目有个需求,前台需要传list参数请求controller接口,一开始直接使用ResponseBody注解,但实践下来发现参数没有传到controller. 现将处理方式记录如下: 1.前台 ...
- BZOJ3230 相似子串 字符串 SA ST表
原文链接http://www.cnblogs.com/zhouzhendong/p/9033092.html 题目传送门 - BZOJ3230 题意 给定字符串$s$.长度为$n$. 现在有$Q$组询 ...
- 027 ResourceBundle.getBundle方法
在程序中遇到这个,感觉会比较重要,就学习一番. 一:静态读取配置文件的Demo 1.新建工程 2.新建properties 3.新建Java的demo程序 注意不要写properties. packa ...
- Python dictionary 字典 常用法
Python dictionary 字典 常用法 d = {} d.has_key(key_in) # if has the key of key_in d.keys() ...