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 ...
随机推荐
- Ubuntu每次启动都显示System program problem detected的解决办法
Ubuntu每次启动都显示System program problem detected的解决办法 sudo gedit /etc/default/apport 将enabled=1改为enabled ...
- json转换对象 对象属性首字母为大写会出错 可以用以下方法
package open_exe; import net.sf.json.JSONObject; import net.sf.json.JsonConfig; import net.sf.json.u ...
- yii 基础版用rbac-plus
1.将高级版的common/models/user.php覆盖掉基础版的models/user.php 2.将命名空间 namespace common\models;改为 namespace app ...
- Kafka组件监控
Kafka web console http://blog.csdn.net/hengyunabc/article/details/40431627 KafkaOffsetMonitor http:/ ...
- OceanBase架构浅析(一)
http://www.cnblogs.com/LiJianBlog/p/4779934.html 简介 OceanBase是阿里集团研发的可扩展的关系数据库,实现了数千亿条记录.数百TB数据上的跨行跨 ...
- URLRedirector 解决网页上无法访问 google CDN 的问题(fonts、ajax、themes、apis等)
URLRedirector 解决网页上无法访问 google CDN 的问题(fonts.ajax.themes.apis等) 由于某些原因,在访问国外的网站时有时候会特别慢,像 stackoverf ...
- PRML读书笔记——Introduction
1.1. Example: Polynomial Curve Fitting 1. Movitate a number of concepts: (1) linear models: Function ...
- Robot framework + appium环境搭建
Robot framework+appium环境搭建 首先梳理一下要用到的工具和安装包: 1. Android + JAVA. jdk : http://www.oracle.com/technetw ...
- 学习OpenCV——HOG+SVM
#include "cv.h" #include "highgui.h" #include "stdafx.h" #include < ...
- 文件上传(java web)
文件上传: 对表单的要求: * method="post" * enctype="multipart/form-data" * 表单中需要添加文件表单项:< ...