http://127.0.0.1:8080/urWebapp/path/A.jsp?param=xxx&param1=xxx这样就可以给a.jsp页面传递参数。如果你觉得不方便的话,可以放到request作用域,或session作用域里,通常我们不建议用户将参数对象放到session作用域里,具体的原因可以参考一些基础的jsp教程向request里存放参数对象:
request.setAttribute("paramName",object);
从request里取参数对象:
request.getAttribute("paramName");
向session里存放参数对象:
session.setAttribute("paramName",object);
从request里取参数对象:
session.getAttribute("paramName");如果一次请求不能到达目标页面的话需要使用session作用域。

解决方案 »

  1.   


    -------------------  a.html----------------------------
    <html>
    <head>
    </head>
    <body>
    <form name="form1">
    <input type="text" name="ttt">
    <input type="button" value="openB" onclick="window.open('b.html','','width=280,height=50');">
    </form>
    </body>
    </html>--------------------b.html ------------------
    <html>
    <head>
    </head>
    <body>
    <form name="form1">
    <input name="ddd">
    <input type="button" value="setB" onclick="opener.document.form1.ttt.value=document.form1.ddd.value;window.close();">
    </form>
    </body>
    </html>
      

  2.   

    window.opener.document.form.keywords.value=window.opener.document.form.keywords.value+" "+form.selected_keywords.options[k].text;
      

  3.   

    可以用javascript来控制。
    如果b页是window.open来的,可以在b页中将值写入到a页的一个文本框(form1.txt1)中在关闭b页时触发就可
      <a href="#" onclick="transValue()">关闭</a><SCRIPT LANGUAGE="JAVASCRIPT">
      function transValue(){
        window.opener.form1.txt1.value = '"+value+"';  //传入jsp中的value数值
        window.close();  //关闭b页
      }
    </SCRIPT>