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 ...
随机推荐
- HTML&CSS
行内元素 <a>.<span>.<br>.<i>.<em>.<strong>.<label>.<q>.& ...
- HTML DOM 事件对象 ondragend 事件
学习网站:http://www.runoob.com/jsref/event-ondragend.html 定义和用法 ondragend 事件在用户完成元素或首选文本的拖动时触发. 拖放是 HTML ...
- leetcode 224. Basic Calculator 、227. Basic Calculator II
这种题都要设置一个符号位的变量 224. Basic Calculator 设置数值和符号两个变量,遇到左括号将数值和符号加进栈中 class Solution { public: int calcu ...
- SQL其他常用的语句
阅读目录 一:汇总数据 1.理解AVG函数 2.理解COUNT()函数 3.理解max()函数 4.理解min()函数 5.理解sum()函数 二:分组数据 1 创建分组(group by) 2 HA ...
- tcping ,一个好用的TCP端口检测工具
1.常用的用法(windows) tcp -w 10 -t -d -i 5 -j --color 81.156.165.66 443 2. http模式 -u,与-h命令连用,每一行输出目标的url ...
- Golang 入门 : 字符串
在 Golang 中,字符串是一种基本类型,这一点和 C 语言不同.C 语言没有原生的字符串类型,而是使用字符数组来表示字符串,并以字符指针来传递字符串.Golang 中的字符串是一个不可改变的 UT ...
- java高级-动态注入替换类Instrumentation
介绍 利用java.lang.instrument(容器类) 做动态 Instrumentation(执行容器) 是 Java SE 5 的新特性. 使用 Instrumentation,开发者可以构 ...
- 比sun.misc.Encoder()/Decoder()的base64更高效的mxBase64算法
package com.mxgraph.online; import java.util.Arrays; /** A very fast and memory efficient class to e ...
- Java 如何存取MySQL datetime类型
1 在java中只有Date类型,这样数据存储到MySQL会出现问题,前台提交的数据,比如2018-03-20 17:30:59,后台用Date接受的时候,由于Date只精确到天,所以默认接收时间为2 ...
- Error updating database. Cause: java.sql.SQLException: Access denied for user '${username}'@'localhost' (using password: YES)
导入别人的项目,出现一个错误,经过排查,是db.properties配置文件中的用户名与Mybatis-conf.xml配置文件中调用的用户名不一致所导致的 (db.properties中用的是nam ...