struts中,页面地址是:http://xxxx/test.do?id=10 当我提交页面后,在action类的execute方法中如何再返回去提交前的页面也就是http://xxxx/test.do?id=10这个页面,用return actionMapping.getInputForward();和return new ActionForward(actionMapping.getInput());都是返回到http://xxxx/test.do 后面的参数没了,怎么样才样返回提交前的URL:http://xxxx/test.do?id=10

解决方案 »

  1.   

    写一个
    <forward name="success2" path="/jsp/xxxx/test.do?id=10"/>
    不就好了?
      

  2.   

    你可以尝试用HTML本来的不就好了?
      

  3.   

    不能带参数,你可以先在action中req.setAttribute,然后再在页面request.getAttribute。
      

  4.   

    同意楼上的,也可以放到session中
    session.setAttribute()
    session.getAttribute()
      

  5.   

    response.sendRedirect("http://xxxx/test.do?id=10 ");试试
      

  6.   

    可以先在action中req.setAttribute,然后再在页面request.getAttribute
      

  7.   

    在struts的配置文件中配置参数
      

  8.   

    尽量使用requestsession中的变量不会清除,除非session失效。 比较占用资源