request.getContextPath()可以吗?
给点分可以吗?

解决方案 »

  1.   

    你这样最好用javascript,放在客户端,还节省服务器的资源,效率高。
    javascript就用location.href
      

  2.   

    1。同二楼,2。struts中好像存在标签,可以显示当前的url。3。jsp中好像也存在标签,用于表示当前的url。建议查找一下
      

  3.   

    用javascript试试看
    <SCRIPT>
    var add = top.location;
    var a1=a1的框架名.location;
    add = add.toString();
    a1=a1.toString();
    document.write (add.substring(add.indexOf("?")+1,add.length));
    document.write (a1.substring(a1.indexOf("?")+1,a1.length));
    </SCRIPT>
      

  4.   

    "bottom中有一个菜单""想在bottom中获得A1的URL地址" --> top.centerFrameName.window.location.href
      

  5.   

    parent.frames("centerFrameName").document.URL