您的位置:首页 > 编程语言 > Java开发

struts and hibernate can use a common beans

2006-02-26 22:42 501 查看
if hibernate is user in your project ,it must have a beans which mapping to the ,hbm.xml file

in the struts ActionForm file we can import the beans file ,getter and setted method is nessary

,then we can use these attributes in the page

example

test beans have a attribute named testValue

TestActionForm.java

private Test test;

public Test getTest(){return this.test;}

public void setTest(Test t){test=t;}

test.jsp

<html:text property="test.testValue"/>

that's ok!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐