当前位置: 代码迷 >> Java Web开发 >> MVC框架中页面传值有关问题
  详细解决方案

MVC框架中页面传值有关问题

热度:3774   发布时间:2013-02-25 21:18:24.0
MVC框架中页面传值问题,在线等
我有一个登录功能,是用<html:text name="allForm" property="jfUser"></html:text>这样的方法传向后台的,这个没问题,现在我想把这个登录人的信息传向另一个JSP页面
<logic:notEmpty name="newsForm" property="newsList">
  <logic:iterate id="lis" name="newsForm" property="newsList">
  <tr><th bgcolor=""><bean:write name="lis" property="title"/></th>
  <th bgcolor=""><bean:write name="lis" property="newsDate"/></th>
   
  <th align="center" ><a href="newsAll.do?newsNo=<bean:write name="lis" property="newsNo"/>">>>详情..</a></th></tr>
  </logic:iterate>
  </logic:notEmpty>  
点这里的详情将用户的ID传过去,不要说用上面代码里的超链接那种传值,ID不在这个list里面的,查了下都说用 <%session.setAttribute("total",allForm);%>这样传递,但怎么传都不行,还是我session写错了,<%session.setAttribute("total",<bean:write name="allForm" property="jfUser");%>这样子也不行

------解决方案--------------------------------------------------------
<%session.setAttribute("total",<bean:write name="allForm" property="jfUser");%>

这写法肯定语法错误

<bean:write name="allForm" property="jfUser")>
这个要换成固定的值才行的
  相关解决方案