神秘的 J2ee 殿堂

·古之学者必有师·做学者亦要做师者·FIGHTING·

action中到jsp页面的数据传递


action中:
        LoginForm loginForm = (LoginForm) form;// TODO Auto-generated method stub
        String name=loginForm.getName();
        request.setAttribute(
"name", name);
        request.setAttribute(
"form", loginForm);

jsp中显示:
 <%=request.getParameter("name")%>
 
<bean:write name="name"/>
 
<bean:write name="form" property="name"/>

如果是传递持久化类的对象的话,显示同form的显示一样

posted on 2007-09-24 18:16 月芽儿 阅读(633) 评论(0)  编辑  收藏 所属分类: J2EE学习心得


只有注册用户登录后才能发表评论。


网站导航:
 

导航

统计

常用链接

留言簿(2)

随笔分类

随笔档案

相册

搜索

最新评论

阅读排行榜

评论排行榜