index1.jsp :    <a href="index2.jsp;id=4?a=b">index2.jsp</a>在index2.jsp 中如何获取到 id ?url

解决方案 »

  1.   

    href="index2.jsp&id=4?a=b"不是分号,是&号String id = (String)request.getParameter("id");
      

  2.   


    错错错错
     <a href="index2.jsp?id=4&a=b">index2.jsp</a>
      

  3.   

    可以存储到session中到下个页面取
      

  4.   

    我试过了你的方法,发现没有用
    HTTP Status 404 
      

  5.   

    http://www.mywebsite.com/sj/test;id=8079?name=sviergn&x=true#stuff Schema: httphost: www.mywebsite.compath: /sj/testURL params: id=8079Query String: name=sviergn&x=trueAnchor: stuff
      

  6.   

    String tempId = request.getParameter("id");