主题:struts2spring2hibernate3
Struts2、Spring2、Hibernate3整合过程中,启动Tomcat6.0的时候报Action class [insertcategoryAction] not found - action - file:/D:/Tomcat%206.0/webapps/SSH2Web/WEB-INF/classes/struts.xml:13:86
我的代码如下:
struts.xml中
<struts>
<include file="struts-default.xml"></include>
<constant name="struts.objectFactory" value="spring"></constant>
<package name="ssh2" extends="struts-default">
<action name="insertcategory" class="insertcategoryAction" method="insertcategory">
<result name="success">/jsp/insertcategory.jsp</result>
</action>
</package>
</struts>
spring中的
<bean id="insertcategoryAction" class="action.CategoryAction">
<property name="categorydao">
<ref bean="categorydao"/>
</property>
</bean>
这个错误应该是struts.xml文件中找class属性里的Action时出错了,请问除了把struts.xml中action的class属性名跟spring(applicationContext.xml)中bean的id属性名配成一样的,还有什么地方需要配置的?
我的代码如下:
struts.xml中
<struts>
<include file="struts-default.xml"></include>
<constant name="struts.objectFactory" value="spring"></constant>
<package name="ssh2" extends="struts-default">
<action name="insertcategory" class="insertcategoryAction" method="insertcategory">
<result name="success">/jsp/insertcategory.jsp</result>
</action>
</package>
</struts>
spring中的
<bean id="insertcategoryAction" class="action.CategoryAction">
<property name="categorydao">
<ref bean="categorydao"/>
</property>
</bean>
这个错误应该是struts.xml文件中找class属性里的Action时出错了,请问除了把struts.xml中action的class属性名跟spring(applicationContext.xml)中bean的id属性名配成一样的,还有什么地方需要配置的?