a.jsp: <script> 
function showSubWindow() { window.open('/path1/path2/test!init.action', 'ref_win', 'width:800px;height:650px;resizable:no;center:yes;help:no;status:no;dependent:yes;'); 

</script> 
</head> 
<body> <s:form action="ppTest.action" theme="simple"> 
<input type="button" value="add" onClick="showSubWindow();" id="normal_button">

解决方案 »

  1.   

    path1是什么名字?你最好在前面加上你的项目名字比如 项目名为 webp/web/path1/path2....
      

  2.   

    你路径写错了。
    检查下你的这个/path1/path2/test!init.action 能访问否
    最好前面加上项目根目录
      

  3.   


    path1包名啊,TestAction.java就在aaa.bbb.ccc.ddd.path1.path2中,项目名是test1,我用/test1/path1/path2不行,用/aaa/bbb/ccc/ddd/path1/path2也不行。
    很是郁闷!
      

  4.   


    我在地址栏里直接输入
    http://localhost:8080/test1/path1/path1/test!init.action
    是可以正常访问的!
    就是不知道window.openg的方法中该怎样写。
      

  5.   

    a.jsp: <script> 
    function showSubWindow() { window.open('<%=request.getContextPath()%>/path1/path2/test!init.action', 'ref_win', 'width:800px;height:650px;resizable:no;center:yes;help:no;status:no;dependent:yes;'); 

    </script> 
    </head> 
    <body> 
      

  6.   

    a.jsp: <script> 
    function showSubWindow() { window.open(' <%=request.getContextPath()%>/path1/path2/test!init.action', 'ref_win', 'width:800px;height:650px;resizable:no;center:yes;help:no;status:no;dependent:yes;'); 

    </script