MyException - 我的异常网
当前位置:我的异常网» Eclipse » org.springframework.beans.factory.NoSuchBeanDefi

org.springframework.beans.factory.NoSuchBeanDefinitionException

www.MyException.Cn  网友分享于:2013-11-11  浏览:1565次
SSH做登录出现No bean named '/login' is defined
javax.servlet.ServletException: No bean named '/login' is defined
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:523)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


root cause 

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '/login' is defined
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:509)
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1041)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:265)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1048)
org.springframework.web.struts.DelegatingActionProxy.getDelegateAction(DelegatingActionProxy.java:130)
org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:112)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.33 logs.



------解决方案--------------------
用的struts1么? formBean和action没绑定?
------解决方案--------------------
<formbean>
<action>
------解决方案--------------------
long.do改成 userForm.do就可以了 因为你上面配置的<form-beans>
<form-bean name="userForm" type="net.zzvc.szmt.aug.web.form.UserForm"></form-bean>
</form-beans>
中name="userForm",判断判定不绑定是看name属性和<action
path="/login"
type="org.springframework.web.struts.DelegatingActionProxy"
parameter="method"
name="userForm"
>
中的name是否一致 他们的name就是你页面要访问的do页面
------解决方案--------------------
额,刚说错了 应该是path这个属性哦,我也才学,见笑了

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有