Spring MVC 使用问题与解决--HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
1.HTTP Status 500 - Servlet.init() for servlet springmvc threw exception

解决
使用jre1.7 Spring4.3
2.springMVC无法访问JSP报404,但是又能访问controller
第一种原因:
mvc
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath*:/mvc.xml
1
<servlet-mapping>
<servlet-name>mvc</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
将url-pattern中/*改为/
配置对所有请求进行了拦截,controller对视图进行分发的时候又拦截。
第二种原因:
当时把jsp文件放到WEB-INF中了,但tomcat默认访问网页的目录是WEB-INF的父目录,正确的目录应该类似以下:

3.
a.No mapping found for HTTP request with URI [/sam_170309Web/user/register.action] in DispatcherServlet with name 'DispatcherServlet'
b.No Spring WebApplicationInitializer types detected on classpath
解决
检查控制器中的@Controller以及mvcContext.xml中的Action注册:<context:component-scan base-package="pers.ryan.***"/>
Spring MVC 使用问题与解决--HTTP Status 500 - Servlet.init() for servlet springmvc threw exception的更多相关文章
- 项目中访问controller报错:HTTP Status 500 - Servlet.init() for servlet spring threw exception
直接访问controller路径http://localhost:8080/index报错: HTTP Status 500 - Servlet.init() for servlet spring t ...
- 深圳宝安图书馆官网错误 HTTP Status 500 - Servlet.init() for servlet spring threw exception
停留了一段时间没有动 打开https://www.balib.cn/balib/category/152 *********************************************** ...
- HTTP Status 500 - Servlet.init() for servlet htmlWebConfig threw exception
HTTP Status 500 - Servlet.init() for servlet htmlWebConfig threw exception
- Tomcat报错:HTTP Status 500 - Wrapper cannot find servlet class
HTTP Status 500 - Wrapper cannot find servlet class com.servlet.servlet.RegServlet or a class it dep ...
- Spring MVC RedirectAttributes的用法解决办法
Spring MVC RedirectAttributes的用法很久没发过技术贴了,今天对于一个问题纠结了2小时,遂放弃研究用另一种方法解决,奈何心中一直存在纠结,发帖求解 我先解释下什么是Redir ...
- Spring MVC配置CORS(解决跨域请求)
1. CORS 简介 同源策略(same origin policy)是浏览器安全的基石.在同源策略的限制下,非同源的网站之间不能发送 ajax 请求的. 为了解决这个问题,w3c 提出了跨源资源共享 ...
- spring mvc 文件下载 get请求解决中文乱码问题
方案简写,自己或有些基础的可以看懂,因为没时间写的那么详细 方案1 spring mvc解决get请求中文乱码问题, 在tamcat中server.xml文件 URIEncoding="UT ...
- Spring MVC请求参数绑定 自定义类型转化 和获取原声带额servlet request response信息
首先还在我们的框架的基础上建立文件 在domian下建立Account实体类 import org.springframework.stereotype.Controller; import org. ...
- 解决 HTTP Status 500 - Unable to show problem report: freemarker.core.InvalidReferenceException:
HTTP Status 500 - Unable to show problem report: freemarker.core.InvalidReferenceException: The foll ...
随机推荐
- asp.net 客户端请求到响应的整个过程
出处:https://www.cnblogs.com/Joans/archive/2012/02/08/2342887.html 疑惑?从客户端发出一个请求,请求到达服务端如何和IIS关联起来?IIS ...
- kernel笔记——内核编译与进程管理
内核与操作系统 由于一些商业操作系统设计上的缺陷以及日益庞杂,“操作系统”的概念对很多人而言变得含糊不清.在进一步讨论Linux内核的话题前,我们先区分“内核”与“操作系统”这两个概念. 操作系统:指 ...
- Cocos2d-x游戏开发之lua编辑器 Sublime 搭建,集成cocos2dLuaApi和自有类
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/wisdom605768292/article/details/34085969 Sublime Te ...
- Linux内核入门到放弃-设备驱动程序-《深入Linux内核架构》笔记
I/O体系结构 总线系统 PCI(Peripheral Component Interconnect) ISA(Industrial Standard Architecture) SBus IEEE1 ...
- AI GMM
GMM(Gaussian Mixture Model,高斯混合模型)通常用于聚类(也用于密度估计),数据是由k个高斯分布生成,每个分布表示一个类. 期望最大(Expectation Maximizat ...
- iOS开发基础-九宫格坐标(1)
一.功能分析 1)以九宫格展示图片信息,每一个 UIView 包含一个 UIImageView .一个 UILabel 和一个 UIButton . 2)加载App数据,根据数据长度创建对应的格子数: ...
- 基于HTML5 的互联网+地铁行业
前言 近几年,互联网与交通运输的融合,改变了交易模式,影响着运输组织和经营方式,改变了运输主体的市场结构.模糊了运营与非营运的界限,也更好的实现了交通资源的集约共享,同时使得更多依靠外力和企业推动交通 ...
- Django组件 之中间件
-------------------------------------------------------------------落花不是无情物,待到山花烂漫时. 中间件 中间件的概念 中间件顾名 ...
- [转帖]Scanners-Box 指引
作者:杨文链接:https://zhuanlan.zhihu.com/p/26534414来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 原文地址:We5ter/Sca ...
- IntelliJ IDEA 2018 设置代码超出限制自动换行(最新版)
环境信息 * IntelliJ IDEA版本:ULTIMATE 2018.2.3:* 系统:Windows 10: 怎么设置IntelliJ IDEA 2018代码一行的换行宽度限制呢? 设置方法:` ...