ActionMapping有一个方法叫做setInput(String input)不知道你用过了没有!

解决方案 »

  1.   

    可以用setPath()方法啊,不过,你既然设置了好几个<forward,那么直接通过名称就可以进行跳转了啊,为什么还要改变path的值啊
    例如:
    <forward name="one"  path="/1.jsp"/>
    <forward name="two"  path="/2.jsp"/>
    <forward name="three"  path="/3.jsp"/>if(...){
    return (mapping.findForward("one"));
    }else if(...){
    return (mapping.findForward("two"));
    }else{
    return (mapping.findForward("three"));
    }这样就可以了啊
      

  2.   

    为什么我在执行actionMapping.setInput("..."),时会出现在以下错误..
    javax.servlet.ServletException: Configuration is frozen
    at org.apache.struts.action.RequestProcessor.processException
      

  3.   

    不清楚你是怎么搞的,我试了一下没有出这个问题
    在你的Action的perform中加入这样两句
    actionMapping.setInput("/test.jsp");//更改struts-config中的input
    return new ActionForward(actionMapping.getInput());//转到更改后的input