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这个属性哦,我也才学,见笑了