[size=10px]<a href="favorite.do?method=getFavo" >${tag.tname}</a>
favorite是action,method是配置文件中那个parameter,getFavo是action中的一个方法,tag是个对象.
我现在想把tag.tname属性传到getFavo这个方法里做处理,但是想不到办法把tag.tname传过去了.
public ActionForward getFavo(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {} 这个里面还能不能接收
其他的参数,或者谁有别的方法...帮我想想吧.谢谢啦!!
[/size]

解决方案 »

  1.   

    <a href='favorite.do?method=getFavo&tagname=${tag.tname}' >${tag.tname} </a> 
    action中接
    request.getParameter("tagname");
      

  2.   

    不行呢 我刚试了..request.getParameter("tagname");是null
      

  3.   

    formbean也不行,好像根本封装不进去...
      

  4.   

    那你是值没有传递过去的问题,有两中方式可以完成你的需要
    就是楼上的一个携带参数
    或者用formBean来传递
      

  5.   

    <html:link page="/voucherAction.do?method=edit" paramId="voucher_id" paramName="voucher" paramProperty="voucher_id">
    参考一下吧!
      

  6.   

    刚才弄错了,用第一个可以了 0.0 谢谢大家帮忙
    这种情况好像不能用actionbean吧?
      

  7.   

    貌似必须表单提交才能自动封装参数进formBean