程序采用struts1+spring2.5+ibatis架构
就实现一个简单的用户登录功能
启动Tomcat老实提示找不到LoginAction类
求解
struts.xml中相关配置:
<action path="/loginAction" type="org.springframework.web.struts.DelegatingActionProxy" validate="true" scope="request">
<forward name="success" path="/loginsucc.jsp" />
<forward name="fail" path="/fail.jsp" />
</action>spring的配置文件applicationContext.xml中相关配置:
<bean name="/loginAction" class="com.lee.action.LoginAction">
<property name="loginDao">
<ref bean="LoginDAO"/>
</property>
</bean>
启动服务器时后台提示错误:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.lee.action.LoginAction] for bean with name '/loginAction' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: com.lee.action.LoginAction找了好久不知道到底哪里出问题了
求高手指点
就实现一个简单的用户登录功能
启动Tomcat老实提示找不到LoginAction类
求解
struts.xml中相关配置:
<action path="/loginAction" type="org.springframework.web.struts.DelegatingActionProxy" validate="true" scope="request">
<forward name="success" path="/loginsucc.jsp" />
<forward name="fail" path="/fail.jsp" />
</action>spring的配置文件applicationContext.xml中相关配置:
<bean name="/loginAction" class="com.lee.action.LoginAction">
<property name="loginDao">
<ref bean="LoginDAO"/>
</property>
</bean>
启动服务器时后台提示错误:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.lee.action.LoginAction] for bean with name '/loginAction' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: com.lee.action.LoginAction找了好久不知道到底哪里出问题了
求高手指点
解决方案 »
- 怎樣使html or jsp頁面達到可以配置(不同的角色進入同一個頁面會顯示不同的部份,即是有些部份顯示,有些部份影藏)
- 本人公司让我开发 电子地图。可是我没有接触过,帮忙!!!!!!!!
- 求助:jsp页面显示word文件乱码问题!
- struts 中 “html:file” 标签的问题!!在线等!!!
- 在 Struts 的 Model-View-Controller 中,如果 TestFormBean 的全部属性 与 TestModelBean 里面的全部属性相一致,TestModelBean 与 Test
- 一个为6位的Bigdecimal的数,想截取前4位该怎么做?
- DWZ前端框架的ssh例子,最好是struts1的
- 在网页中显示word文档问题
- 一个参数提交的问题!
- jsp中调用javaBean出错
- ECSIDE 导出EXCEL文件的简单问题,散分
- 关于tomcat的小问题 急。。
就算是struts2
你说该怎么解决呢?
<bean name="/loginAction" class="com.lee.action.LoginAction">
<property name="loginDao">
<ref bean="LoginDAO"/>
</property>
</bean>
红字写完整路径
<bean name="/loginAction" class="com.lee.action.LoginAciton">
<property name="loginDao">
<ref bean="loginDAO"/>
</property>
</bean>
好吧,我承认,是我的类名写成LoginAciton了...
<list>
<value>classpath:/com/test/bean/Users.hbm.xml</value>
</list>
试试
还有,我没有看到applicationContext里配没配dataSource,因为你引用了,所以需要配置这个对象。
<list>
<value>classpath:/com/test/bean/Users.hbm.xml</value>
</list>
试试
还有,我没有看到applicationContext里配没配dataSource,因为你引用了,所以需要配置这个对象。