我想把jsp页面输出的一个值,比如<bean:write name="person" property="countid"/>,传入到action中有什么办法吗?请各位大侠不令赐教

解决方案 »

  1.   

    这个值既然已经在Server端person对象中,在Server端想办法共享(如放到Session中)即可。
      

  2.   

    要传入action,简单,在form后面加上参数,还有一种,如果没有form,在submit提交的时候,把这个值放在hidden里面,然后document.getElementById();然后location.href
      

  3.   

    <form .....  action="你的action?参数名=值">   
     后台取值  request.getParameter(“参数名”)
    这是最简单的一种办法了。。
      

  4.   

    如果你是用POST提交,那么可以放在hidden里面!
    <input type="hidden" name="p" value='<bean:write name="person" property="countid'/>">
    如果你是用GET提交,就可以直接用问号传过去
    XXX.do?p=<bean:write name="person" property="countid'/>