又是这个问题,求救啊。。各路高手帮帮小弟,感激涕零。。
我的struts config是:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd"><struts-config>
<data-sources />
<form-beans>
<form-bean name="fileBasicInformationForm"
type="com.healthWeb.struts.form.FileBasicInformationForm" /> </form-beans> <global-exceptions />
<global-forwards />
<action-mappings>
<action attribute="fileBasicInformationForm"
input="/fileBasicInformation.jsp" name="fileBasicInformationForm"
path="/fileBasicInformation" scope="request">
<forward name="success" path="/success.jsp" />
</action>
</action-mappings>
<controller>
<set-property property="processorClass"
value="org.springframework.web.struts.DelegatingRequestProcessor" />
</controller>
<message-resources
parameter="com.healthWeb.struts.ApplicationResources" />
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/applicationContext.xml" />
</plug-in>
</struts-config>spring的application config是:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver">
</property>
<property name="url" value="jdbc:sqlserver://localhost:1433"></property>
<property name="username" value="sa"></property>
<property name="password" value="pandonghua"></property>
</bean> <bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>
com/healthFile/vo/FileBasicInformation.hbm.xml
</value>
</list>
</property>
</bean> <bean id="fileBasicInformationDAO"
class="com.healthFile.dao.FileBasicInformationDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean> <bean id="healthFileService" name="healthFileService"
class="com.healthFile.service.HealthFileService">
<property name="fileBasicInformationDAO">
<ref local="fileBasicInformationDAO" />
</property>
</bean> <bean id="fileBasicInformation" name="fileBasicInformation"
class="com.healthWeb.struts.action.FileBasicInformationAction">
<property name="healthFileService">
<ref local="healthFileService" />
</property>
</bean>
</beans>╮(╯▽╰)╭、、、、我实在找不到什么问题了、、、知道的劳烦帮帮忙、、、

解决方案 »

  1.   

    <bean id="fileBasicInformation" name="fileBasicInformation" 
    改成<bean  name="/fileBasicInformation" 
      

  2.   

     你吧Struts的Action交给Sping代理那么就应该在struts.config 文件的Action里加入
    type="org.springframework.web.struts.DelegatingActionProxy
    写成
    <action attribute="fileBasicInformationForm" 
       input="/fileBasicInformation.jsp" name="fileBasicInformationForm" 
        path="/fileBasicInformation" scope="request"
     type="org.springframework.web.struts.DelegatingActionProxy> 以及一楼的正解
      

  3.   

    我在里面使用了controller,还要用type吗?我在网上找到了这样的解释:
    主要是因为myeclipse为项目自动加入的commons-beanutils.jar和commons-collections.jar相冲突,还有asm-2.2.3.jar ,解决方法主要有以下二点: 
        1.删除myeclispe自动加入的asm-2.2.3.jar 
        2.去www.apache.org官方网下载commons-beanutils-1.8.0.jar文件,替换myeclispe自动加入的commons-beanutils.jar包 我试着去做了、、真的实现了、、不过还是有其他问题,谢谢啦、
    原文地址:http://qzone.qq.com/blog/58472399-1231688021