Spring MVC 使用问题与解决--HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
2017-03-09 12:32
796 查看
1.HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
解决
使用jre1.7 Spring4.3
2.springMVC无法访问JSP报404,但是又能访问controller
第一种原因:<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.***"/>
相关文章推荐
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception解决方法
- 出现 HTTP Status 500 - Servlet.init() for servlet springmvc threw exception 异常的原因及解决方法
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- HTTP Status 500 - Servlet.init() for servlet spring-dispatcher threw exception 分析及解决
- HTTP Status 500 - Servlet.init() for servlet springMVC threw exception
- 出现 HTTP Status 500 - Servlet.init() for servlet springmvc threw exception 异常
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- HTTP Status 500 - Servlet.init() for servlet springMVC threw exception
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- SpringMVC-HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- SpringMVC异常:HTTP Status 500 - Servlet.init() for servlet springmvc threw exception
- Spring MVC - HTTP Status 500 - Servlet.init() for servlet loginDispacher threw exception
- Maven ssm框架配置报错HTTP Status 500 - Servlet.init() for servlet spring threw exception
- Status 500 - Servlet.init() for servlet springMVC threw exception的错误原因
- 项目中访问controller报错:HTTP Status 500 - Servlet.init() for servlet spring threw exception