struts2 - Struts 2 w/ Hibernate 4 property tag issue in result jsp -
i trying forward string (resultado) comes hibernate list (result) hql , listing goes well, , fetch result (that answer 1 siple row , selected column name/variable)
list<string> result = (list<string>)query.list(); hibernatesession.gettransaction().commit(); hibernatesession.close(); (string resultado: result) system.out.println(resultado);
all goes , can sysout "resultado" on console... on forwarded jsp (resultado.jsp) string not there. after text "o resultado é" there nothing...
resultado.jsp
<body> <h4>o resultado é <s:property value="resultado" /></h4> </body>
struts.xml
<package name="default" extends="struts-default" namespace="/"> <action name="query" class="mypackage.dao.myaction"> <result name="success" >resultado.jsp</result> </action>
i have tried understand in struts2 can see long action mapped in struts 2 , forwarded (this case resultado.jsp) page, use <s:property value="variable want" />
o achieve this... maybe i'm missing something.
Comments
Post a Comment