ssh框架 链接中调用action并传值
read.jsp中<divid="main"><divid="one"><ahref="readShow/readShowList.action?rstate='poet...
read.jsp中
<div id="main">
<div id="one"><a href="readShow/readShowList.action?rstate='poetry'" target="_self">诗歌</a></div>
</div>
struts.xml中
<action name="readShowList" class="readShow" method="stateChoice">
<result type="redirect" name="success">readList.jsp</result>
<result type="redirect" name="fail">/main.html</result>
</action>
applicationContext.xml中
<bean id="readShow" class="com.ssh2test1.action.ReadManageAction">
<property name="readBiz">
<ref bean="readBiz" />
</property>
</bean>
错误信息
[Executing action method = stateChoice] [QC] DEBUG [http-bio-8080-exec-7] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(72) |
[Opening Hibernate Session] [QC] DEBUG [http-bio-8080-exec-7] org.springframework.orm.hibernate3.SessionFactoryUtils.doGetSession(328) |
[Closing Hibernate Session] [QC] DEBUG [http-bio-8080-exec-7] org.springframework.orm.hibernate3.SessionFactoryUtils.closeSession(820) |
[Exception occurred during processing request: could not resolve property: 'poetry' of: com.hibtest1.entity.Read; nested exception is org.hibernate.QueryException: could not resolve property: 'poetry' of: com.hibtest1.entity.Read] [QC] ERROR [http-bio-8080-exec-7] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.error(38) |
org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: 'poetry' of: com.hibtest1.entity.Read; nested exception is org.hibernate.QueryException: could not resolve property: 'poetry' of: com.hibtest1.entity.Read 展开
<div id="main">
<div id="one"><a href="readShow/readShowList.action?rstate='poetry'" target="_self">诗歌</a></div>
</div>
struts.xml中
<action name="readShowList" class="readShow" method="stateChoice">
<result type="redirect" name="success">readList.jsp</result>
<result type="redirect" name="fail">/main.html</result>
</action>
applicationContext.xml中
<bean id="readShow" class="com.ssh2test1.action.ReadManageAction">
<property name="readBiz">
<ref bean="readBiz" />
</property>
</bean>
错误信息
[Executing action method = stateChoice] [QC] DEBUG [http-bio-8080-exec-7] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.debug(72) |
[Opening Hibernate Session] [QC] DEBUG [http-bio-8080-exec-7] org.springframework.orm.hibernate3.SessionFactoryUtils.doGetSession(328) |
[Closing Hibernate Session] [QC] DEBUG [http-bio-8080-exec-7] org.springframework.orm.hibernate3.SessionFactoryUtils.closeSession(820) |
[Exception occurred during processing request: could not resolve property: 'poetry' of: com.hibtest1.entity.Read; nested exception is org.hibernate.QueryException: could not resolve property: 'poetry' of: com.hibtest1.entity.Read] [QC] ERROR [http-bio-8080-exec-7] com.opensymphony.xwork2.util.logging.commons.CommonsLogger.error(38) |
org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: 'poetry' of: com.hibtest1.entity.Read; nested exception is org.hibernate.QueryException: could not resolve property: 'poetry' of: com.hibtest1.entity.Read 展开
2个回答
展开全部
不能解析poetry这个属性,你看看是在dao查询语句写错了这属性,还是在hbm映射文件中没有配置正确poetry这属性。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询