struts-config.xml内容如下:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<form-beans>
<form-bean name="orgForm" type="com.bjsxt.oa.web.forms.OrgActionForm"></form-bean>
</form-beans> <action-mappings>
<action path="/org"
type="org.springframework.web.struts.DelegatingActionProxy" name="orgForm"
scope="request" parameter="method">
<forward name="index" path="/org/index.jsp"></forward>
<forward name="add_input" path="/org/add_input.jsp" />
</action>
</action-mappings>
<controller>
<set-property property="processorClass"
value="org.springframework.web.struts.DelegatingRequestProcessor" />
</controller>
<message-resources parameter="MessageResources" />
</struts-config>applicationContext.xml中配置的bean属性如下:
<bean id="orgManager" class="com.bjsxt.oa.manager.impl.OrgManagerImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean name="/org" class="com.bjsxt.oa.web.actions.OrgAction" scope="prototype">
<property name="orgManager" ref="orgManager"/>
</bean>出错提示:org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/org' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'orgManager' of bean class [com.bjsxt.oa.web.actions.OrgAction]: Bean property 'orgManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<form-beans>
<form-bean name="orgForm" type="com.bjsxt.oa.web.forms.OrgActionForm"></form-bean>
</form-beans> <action-mappings>
<action path="/org"
type="org.springframework.web.struts.DelegatingActionProxy" name="orgForm"
scope="request" parameter="method">
<forward name="index" path="/org/index.jsp"></forward>
<forward name="add_input" path="/org/add_input.jsp" />
</action>
</action-mappings>
<controller>
<set-property property="processorClass"
value="org.springframework.web.struts.DelegatingRequestProcessor" />
</controller>
<message-resources parameter="MessageResources" />
</struts-config>applicationContext.xml中配置的bean属性如下:
<bean id="orgManager" class="com.bjsxt.oa.manager.impl.OrgManagerImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean name="/org" class="com.bjsxt.oa.web.actions.OrgAction" scope="prototype">
<property name="orgManager" ref="orgManager"/>
</bean>出错提示:org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/org' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'orgManager' of bean class [com.bjsxt.oa.web.actions.OrgAction]: Bean property 'orgManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
解决方案 »
- extremeDB
- struts2里面怎么设置request.setAtrribute("user",user)
- EJB问题,高手帮忙,谢谢
- 100分求解:Spring+Hibernate中的事务不能回滚!
- 刚接触axis,看不懂代码 求代码注释!!
- 初学者的苦恼!!!
- 有关Apache2+Tomcat 5.0整合的文章很多(但总是无法实验成功)到底应该怎么整合呢?(请高手说说)
- Jdbc连接msSql的两种形式的区别,同一段代码中Microsoft SQL Server 2000 Driver for JDBC连接没有报错,而用JDBC ODBC形式就报错了.
- 请教两个问题
- 哪里有j2ee api的下载啊,在sun网站上看太麻烦了,偶想下载到在本机上浏览·
- 有关EE的类包
- dwr的一个小问题
orgManager属性没有set/get方法!!