用的是struts2.1.6,一个表单输入,验证有错误后,返回的页面为一个action,我的struts.xml该怎么配置。

解决方案 »

  1.   

    succss 有一个, error还有一个,或者自定义一个
      

  2.   

    检查一下你的代码,
    struts.xml里面要配置那个Action
      

  3.   


    老大,请看清题目。我需要返回的不是页面,是action.
    我试了actionName!methodName.action这种方式,不行。
    <result name="success">/co-mgr/list.jsp?classId=${classId}</result>
    <result name="error">coInit!initAdd.action
    </result>
    <result name="input">coInit!initAdd.action</result>
      

  4.   

    <action name="ME0001" method="doMethod1" class="a.b.LoginAction">
        <result>/list.jsp</result>
        <result name="input" type="redirectAction">
            <param name="actionName">coInit</param>
            <param name="namespace">/</param>
        </result>
    </action>
      

  5.   

    <result name="input" type="chain">
      

  6.   

    不重定向可以转到另一个 action吗? 
      

  7.   

    struts验证出错,返回的是“input”字符串,所以在配置文件中相应action中配置结果“input”就行了。我也是前两天刚学的
      

  8.   

    <action name="actionName" class="">
    <result name="success">actionName!methodName.action</result>
    </action>