Property 'content' not found on type org.hibernate.collection.PersistentSet

问题描述

<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%><%@taglibprefix="s"uri="/struts-tags"%><!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"><html><head><title>......</title><styletype="text/css">#title{font-family:微软雅黑;font-size:20px;}#test{width:150px;height:200px;}</style><SCRIPTtype="text/javascript">functionshow(aaa){max=500;if(aaa.value.length<max){document.getElementById("sp").innerHTML="字数必须超过5000";}else{document.myfor.submit();}}</SCRIPT><SCRIPTtype="text/javascript"src="jquery-1.8.0.min.js"></SCRIPT><SCRIPTtype="text/javascript">functiongetN(){$.ajax({url:'replie!getplies.action',data:'replies.content='+replies.content,type='post',success:function(result){$("#replyTime").html(result);}});}</SCRIPT></head><body><center><div><divalign="left"id="title"><span><s:propertyvalue="#request.ccc.title"/></span><table><tr><td>发表于:<s:propertyvalue="#request.ccc.reporttime"/></td></tr><tr><td><s:propertyvalue="#request.ccc.content"/></td></tr><tr><td>读者回应:</td></tr><s:iteratorvalue="#request.ccc"var="a"><tr><td>${a.sets.content}</td><td>${a.sets.replyTime}</td></tr></s:iterator></table><s:formmethod="post"action="replie!getplies.action"name="myfor"id="myfro"onchange="getN"><s:textareaname="replies.content"id="test"onblur="returnshow(this)"/><spanid="sp"></span><br/><table><tr><td><inputtype="submit"value="提交"/></td></tr></table></s:form></div></div></center></body></html>${a.sets.}这里报错<?xmlversion="1.0"?><!DOCTYPEhibernate-mappingPUBLIC"-//Hibernate/HibernateMappingDTD3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"><hibernate-mapping><classname="cn.xml.model.replies"table="replies"><idname="id"column="Id"><generatorclass="sequence"><paramname="sequence">sq_a</param></generator></id><propertyname="content"column="content"/><propertyname="replyTime"column="replytime"/><many-to-onename="informations"class="cn.xml.model.Informations"column="infold"cascade="all"fetch="select"></many-to-one></class></hibernate-mapping>两张表配置<?xmlversion="1.0"?><!DOCTYPEhibernate-mappingPUBLIC"-//Hibernate/HibernateMappingDTD3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"><hibernate-mapping><classname="cn.xml.model.Informations"table="informations"><idname="infold"column="infold"type="java.lang.Integer"><generatorclass="sequence"><paramname="sequence">sq_a</param></generator></id><propertyname="title"column="titleNAME"></property><propertyname="content"column="content"></property><propertyname="replycount"column="replyCount"></property><propertyname="viewcount"column="viewCount"></property><propertyname="reporttime"column="AUTHORTIME"/><propertyname="lastposttime"column="LATELYTIME"></property><setname="sets"cascade="all"inverse="true"fetch="join"><keycolumn="Id"></key><one-to-manyclass="cn.xml.model.replies"/></set></class></hibernate-mapping>

解决方案

解决方案二:
${a.sets.点}这里报错Property'content'notfoundontypeorg.hibernate.collection.PersistentSetAnexceptionoccurredprocessingJSPpage/adminleft.jspatline7168:69:70:71:${a.sets.content}72:73:74:${a.sets.replyTime}Stacktrace:
解决方案三:
${a.sets.content}//sets不是一个单独的entity对象,它是一个集合,还得对它进行循环才能调用content属性

解决方案四:
如果你想输出content的大小,可以引入JSTL的FN函数标签库这样写:${fn:length(a.sets.content)}参考地址:http://jun1986.iteye.com/blog/1067107
解决方案五:
看你贴出来的,没得格式看着真心吃力

时间: 2024-11-09 03:16:08

Property &amp;#x27;content&amp;#x27; not found on type org.hibernate.collection.PersistentSet的相关文章

spring+ibatis整合启动出现Property &amp;amp;#x27;sqlMapClient&amp;amp;#x27; is required

问题描述 <!--启动包扫描功能--><context:component-scanbase-package="cn.jugame.*"></context:component-scan><beanid="propertyConfigurer"class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

jsp(javabea) Can&amp;amp;#x27;t find a method to write property &amp;amp;#x27;pwdNum&amp;amp;#x27; of type &amp;amp;#x27;int&amp;amp;#x27;

问题描述 下面的程序错在那里了呀那位高手给分析解决一下呀程序是index.jsp的代码是<%@pagelanguage="java"import="java.util.*"pageEncoding="gb2312"%><%Stringpath=request.getContextPath();StringbasePath=request.getScheme()+"://"+request.getServerN

spring bean property &amp;amp;#x27;xxx&amp;amp;#x27; not writable or has an invalid setter method

问题描述 程序在本地myEclips可以运行打包成jar后运行异常springbeanproperty'xxx'notwritableorhasaninvalidsettermethod 解决方案

JS里面出现Cannot set property &amp;amp;#x27;onfocus&amp;amp;#x27; of undefined的错误提示

问题描述 这是html里的:<divclass="dropdown"id="dropbox"><divclass="narrowfeedback"><textareaname="add_comment"class="sayno"placeholder="不说点什么吗?"></textarea></div></div>

求解Microsoft VBScript 编译器错误 错误 &amp;amp;#x27;800a0400&amp;amp;#x27;

问题描述 <%@LANGUAGE="VBSCRIPT"CODEPAGE="65001"%><%OptionExplicit%><htmlxmlns="http://www.w3.org/1999/xhtml"><head><%response.charset="utf-8"%><!--#includefile="NoSqlHack.asp"-

java.sql.SQLException: Access denied for user &amp;amp;#x27;root&amp;amp;#x27;@&amp;amp;#x27;localhost&amp;amp;#x27; (using password

问题描述 连接MySql数据库,出现java.sql.SQLException:Accessdeniedforuser'root'@'localhost'(usingpassword:YES)的问题,用户名是root,密码是123456,这是我自己设置的密码,为什么连接失败呢???我在MySql中的可视化软件中,测试连接,连接成功,可是为什么在Javaweb中连接数据库不成功呢????比较急!!求解!! 解决方案 本帖最后由 PsMuJIngHua 于 2013-02-02 07:51:44 编

Ext运行页面出错:&amp;amp;#x27;events&amp;amp;#x27;为空或不是对象,不知道什么地方出错了!

问题描述 <body><scripttype="text/javascript"language="javascript">functionallFunction(){init();initTabPanel()}functioninit(){newExt.Viewport({layout:'border',items:[{region:'north',html:'n',title:'北',height:100,collapsible:true

用Responses.Write(&amp;amp;quot;&amp;amp;lt;script language=&amp;amp;#x27;javascript&amp;amp;#x27;&amp;amp;gt;alert(...);&amp;amp;lt;/script&amp;amp;gt;&amp;amp;quot;) 之后再次访问此页面还会弹出对话框??

问题描述 如题,我估计是已经把js写入客户端了,所以再次访问的时候就又弹出了.有没有人知道怎么防止这种情况发生啊???谢谢大家了!!! 解决方案 解决方案二:Page.ClientScript.RegisterStartupScript解决方案三:if(!Page.IsPostBack){Responses.Write("<scriptlanguage='javascript'>alert(...);</script>")}

BeanFactory not initialized or already closed - call &amp;amp;#x27;refresh&amp;amp;#x27; ....

问题描述 osgi下编写一个bundle,在apache-fuse的servicemix.bat下使用命令osgi:update178(bundleid),出现以下提示:BeanFactorynotinitializedoralreadyclosed-call'refresh'beforeaccessingbeansviatheApplicationContext.atorg.springframework.context.support.AbstractRefreshableApplicati