1. 启动tomcat显示build success但无法继续启动的解决方法

2. Servlet.service() for servlet [jsp] in context with path [/***] threw exception [java.lang.NullPointerException] with root cause


本次解决方法:最初在Build Path里加上了tomcat server的libraries可能有冲突,去掉后在pom文件中添加依赖

3. The method getDispatcherType() is undefined for the type HttpServletRequest

应该是是javax.servlet和tomcat的架包冲突,在pom文件把依赖改为3.1后好了
4. 使用springmvc访问时404,无法解析controller
注意是否在web.xml忘记配置

本文解决了Tomcat启动时出现的各种问题,包括显示build success但无法继续启动、Servlet.service()抛出NullPointerException异常等,并提供了Spring MVC配置不当导致404错误的解决方案。
637

被折叠的 条评论
为什么被折叠?



