如果一个jsp页面中用 <a href="gkqy.do?operate=toAdd&xh= <bean:write name="xh"/>">新增 </a> </center>传xh参数,另一个页面只用一个 <html:hidden property="xh" />就直接可以得到值了了吗?我现在就是这样,但好象不对,我记得以前得先在代码中用request取,再request赋予 <html:hidden property="xh" />。 

解决方案 »

  1.   

    用${xh},,set到request.再转到页面里去把xh和set时的键对应就行了啊。
    request.setAttribute("xh",xh);
    还是你的必须用HTML标签的啊。
      

  2.   

    为什么我现在没有接受xh的操作如request.getAttribute("xh"),直接用<html:hidden property="xh" />就能取得??
      

  3.   

    用 request 是这样取
    String id = request.getParameter("newsId");<input type="hidden" name="name" value="ABCD"> 
    rquest.getParamenter("name");
    这样吧 试试看吧