Cannot find class for bean with name '/hello' defined in ServletContext resource
Cannot find class for bean with name '/hello' defined in ServletContext resource [/WEB-INF/chapter2-servlet.xml]
今天第一天使用Spring MVC按照pdf上的例子来做第一个"Hello World",结果就报错了。
我用的是eclipse来做的。
- 首先新建一个web项目,项目截图如图所示,注意观察一下WEB-INF下面是没有"classes"文件夹的。
- 然后右键一下看看build path,然后我好想明白了点什么,编译之后的classes文件夹根本就没有放到WEB-INF目录下,当然会找不到类了。
- 后来直接把build path下的classes文件直接复制到了WEB-INF目录下,然后重启tomcat,我的hello, world就这样出来了。
希望能报这个错误给大家拿来参考下!
Cannot find class for bean with name '/hello' defined in ServletContext resource的更多相关文章
- Linux:Tomcat报错: Error creating bean with name 'mapScheduler' defined in ServletContext resource 的解决方法
2013-12-31 14:22:28 [ERROR] [ContextLoader.java->initWebApplicationContext(220) Context initializ ...
- 错误/异常:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/beans_common.xml]...的解决方法
1.第一个这种类型的异常 1.1.异常信息:org.springframework.beans.factory.BeanCreationException: Error creating bean w ...
- Error creating bean with name 'transactionManager' defined in ServletContext resource XXX
spring & hibernate整合时候 ,并且使用hibernate.cfg.xml文件时回报这个错误, 解决办法,在hibernate.cfg.xml中加入 <property ...
- Spring MVC集成thymeleaf时提示:defined in ServletContext resource [/WEB-INF/SrpingMVCTest-servlet.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException
错误提示: defined in ServletContext resource [/WEB-INF/SrpingMVCTest-servlet.xml]: Instantiation of bean ...
- Spring:No bean named 'beanScope' is defined
初学Spring,“No bean named 'beanScope' is defined”这个问题困扰了我好几个小时,查资料无果后,重写好几遍代码后发现问题居然是配置文件不能放在包里...要放在s ...
- No bean named 'transactionManager' is defined
2016-10-20 23:27:17.771 INFO 7096 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped &quo ...
- Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; neste
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto ...
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSessionRepositoryFilter' is defined
spring-session 集成redis,web.xml配置filter时候出现 No bean named 'springSessionRepositoryFilter' is defined ...
- 【Spring】手动获取spring容器对象时,报no qualifying bean of type is defined
手动获取容器对象时,报no qualifying bean of type is defined, 经过调查,发现手动获取的时候,该类所在的包必须经过spring容器初始化. 1.SpringConf ...
随机推荐
- IOS第16天(1,Quartz2D基本图像绘制)
***************基本图像绘制 画线 #import "HMLineView.h" @implementation HMLineView - (id)initWithF ...
- 20145224&20145238《信息安全系统设计基础》实验四
20145224陈颢文20145238荆玉茗 <信息安全系统设计基础>第四次实验报告 课程:信息安全系统设计基础 班级: 1452 姓名:荆玉茗 陈颢文 学号:20145238 20145 ...
- 开发回归测试之Selenium开发环境搭建
前言 在解bug的过程中,经常遇到解完某个bug带来新的bug,原因一般是因为回归测试不足或不全面,下面我们来看看怎么利用selenium工具来完成开发后的回归测试, 虽然这可能是QA的事,不过有利于 ...
- 获取 Cookie
/// <summary> /// 获取WPF url 地址中的Cookies /// </summary> public partial class Coo ...
- 使用NPOI将TABLE内容导出到EXCEL
项目中需要将页面中的table内容导出到EXCEL,在用了几种方法后发现NPO是最快&最好的 需要应用 NPOI.dll 还有个Ionic.Zip.dll不知道有用没,没去研究,两个DLL都放 ...
- 关于HTML5中video标签的奇怪现象
很多人刚开始学习html5 的时候在使用video标签时会出现这样的情况: 发现video标签在网页中播放时只有声音但是没有图像,如: <!DOCTYPE html> <html&g ...
- PHP多台服务器跨域SESSION共享
网站业务规模和访问量的逐步发展,原本由单台服务器.单个域名的迷你网站架构已经无法满足发展需要. 此时我们可能会购买更多服务器,并且启用多个二级子域名以频道化的方式,根据业务功能将网站分布部署在独立的服 ...
- Json 、 Jsonp
SONP is simply a hack to allow web apps to retrieve data across domains. It could be said that it vi ...
- 计算机视觉(Computer Version,CV)、模式识别、人工智能
一.计算机视觉 Divid Marr将计算机视觉系统的开发问题归纳为3个要素: (1)数学理论 考虑数学计算层面的目标及可以引入的合理约束条件. (2)描述和算法 重点解决计算机视觉中的输入输出的数据 ...
- 与子域名共用session信息
参考自 http://www.jb51.net/article/19664.htm 下面的步骤只使用于两个域名在同一个服务起得情况下,如果不在一个服务器上,就需要考虑通过数据库来存储session信息 ...