可以,但mapping.findForward()是到struts-config.xml中去寻找参数,所以你要配置好。比如在struts-config.xml的<action-mapping>中有<forward name="show" path="/show.jsp"/>,那么return mapping.findForward("show")就可以将页面跳转到show.jsp。

解决方案 »

  1.   

    我说的是一个URL,如www.baidu.com,不是一个页面
      

  2.   

    我想一般是不可以直接在ACTION中直接跳转页面的;因为他要通过配置文件去查找来确定该跳转到那个页面;
      

  3.   

    如果你要在ACTION中去跳转,那还要那个配置文件做什么????
      

  4.   

    struts指到一个页面sentToXXX.html,用js转到这个URL去
      

  5.   

    我说的是要用配置文件.
    如; <forward name="ok" path="/ok.jsp" />
    我可不可以改成 <forward name="ok" path="http://www.baidu.com" />
    或者是怎么改才正确
      

  6.   

    直接在path中指定url可能不行,你可以这样:还是跳转到一个jsp页面,此jsp页面代码如下
    <%@ page contentType="text/html;charset=gbk" %>
    <html>
    <head>
    <script language="javascript">
    function open(){
    document.location="http://www.sina.com.cn";
    }
    </script>
    </head>
    <body onload="javascript:open()">
    </body>
    </htmL>
    页面会自动转到http://www.sina.com.cn。