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第七天(4:UiTableView 数据的显示优化重复实例和tableFooterView和tableHeaderView)
//加上头部 和底部 - (void)viewDidLoad { [super viewDidLoad]; [self tableView]; // 设置行高 self.tableView.rowHe ...
- The Earth Mover's Distance
The EMD is based on the minimal cost that must be paid to transform one distribution into the other. ...
- 【iCore3 双核心板】例程十五:USB_CDC实验——高速数据传输
实验指导书及代码包下载: http://pan.baidu.com/s/1gemYjz9 iCore3 购买链接: https://item.taobao.com/item.htm?id=524229 ...
- IE6低版本jQuery里的show和hide方法BUG
公司内部一直在用的jQ的版本有些低,具体是哪个版本不太清楚,相关的东西都给删掉了,今天在做一个固定在页面右侧的导航的时候,IE6里出现了一个比较奇葩的问题.具体样子如下图: 收起是用定位left等于负 ...
- 奥迪--Q5
-型号:Q5 -价格:40-53W -动力:2T -变速箱:8挡手自一体 -长宽高:4.63,1.90,1.66 -油箱:75L -发动机:EA888 -大灯:氙气
- Box2D淌坑日记: 关节(Joint)和旋转关节(b2RevoluteJoint)
关节在Box2D的对象组织结构中,与b2Body(刚体)并列.因此两种对象都是由b2World创建并直接管理. 然而Joint有依赖于b2Body的地方,就是它的销毁:当关节所涉及到的刚体被销毁,关节 ...
- fopen w c
http://php.net/manual/en/function.fopen.php
- LINUX VI 常用命令
vi 打开或新建 vi filename 打开或新建文件 并将光标置于第一行首 光标 ) 光标移至句尾 ( 光标移至句首 屏幕翻滚类命令 Ctrl+u 向文件首翻半屏 Ctrl+d 向文件尾翻半屏 ...
- Access项目文件的版本控制
简单记录一下使用MS Access SVN(以下简称AccessSVN)的步骤吧. AccessSVN在http://accesssvn.codeplex.com/,该产品的目的是:Access SV ...
- 并发案例--ScheduledExecutorService用法
InstanceFactory.getInstance(ScheduledExecutorService.class).schedule(new Callable<Object>() { ...