倒!咋得都可以啊!不就和一个Servlet转到另一个Servlet一样吗?
你可以使用return new ActionForward(""),也可以response.sendRedirect("")啊!嘿嘿!

解决方案 »

  1.   

    然后再重定向之后return null就OK了!
      

  2.   

    //前面代码略
    execute(,){
       
        String strMapJump = null;
        tacheNo = Integer.parseInt(request.getParameter("tacheNo"));
        switch(tacheNo){
        
            case 1:
               strJumpMap = "success1";
            break;            case 2:
                strJumpMap = "success2";
            break;  
        }    return mapping.findforward(strJumpMap);
    }//配置struts-confg.xml
    <action-mappings>
    <action 
    attribute="loginForm"
    name="loginForm"
    path="login"
    scope="request"
    type="com.test.loginAction">
    <forward
    name="success1"
    path="/login/success1.jsp"
    redirect="true"/>
    <forward
    name="success2"
    path="/login/success2.jsp"
    redirect="true"/>
    </action>
    </action-mappings>根据传递的tacheNo值的不同,跳转到不同的页面。
    朋友,可以看明白么?
      

  3.   

    你想跳转到另一个action ,同样容易,比如把tache=2映射到跳转到userShowAction,
    只要这样修改。
    //配置struts-confg.xml
    <action-mappings>
    <action 
    attribute="loginForm"
    name="loginForm"
    path="login"
    scope="request"
    type="com.test.loginAction">
    <forward
    name="success1"
    path="/login/success1.jsp"
    redirect="true"/>
    <forward
    name="success2"
    path="/userShow.do"
    redirect="true"/>
    </action>
    </action-mappings>
      

  4.   

    往配置里一下, 直接forware过去不就得了
      

  5.   

    直接配置<forward...的path属性,指向一个ACTION即可。
    ACTION和JSP在structs看来是同质的,都是一种资源。
      

  6.   

    而且发出forward转发的action和接收forward的action使用同一个form,这点要明白。
      

  7.   

    return new ActionFoward("next.do");
      

  8.   

    Action1里:return mapping.findforward("gotoanother");
    struts-config.xml
    <global-forwards >
        <forward name="gotoanother" path="another.do"/>
    </global-forwards>