例如在b.jsp中获取 abc
  a.jsp
 <form action="b.jsp?action=abc">

解决方案 »

  1.   

    可以通过在访问abc时,就将abc存在session中,然后在b.jsp中获取
      

  2.   

     不是通过getParameter获取的吗
      

  3.   

    有两种常用的
    第一:超链接
    <a href="b.jsp?name=张三">点击我</a>
    在b.jsp中request.getParameter("name");
    第二种:使用表单提交
    <form action="b.jsp" method="get">//此处或者写method="post"
    <input type="hidden" name="name" value="张三"/>
    //标签hidden在页面不显示,但是它的值能传递到要传递的地方
    <input type="submit" value="提交"/>
    </form>
      

  4.   

    第2种,在b.jsp中也是request.getParameter("name");
      

  5.   

    这个用request.getParameter("Action");就能拿到ABC
      

  6.   

    哥们,一般不要往session中放,你放的多了,会降低你程序的性能,用户访问量大时可能会死机或程序运行速度很慢等问题,