03. struts2中Action配置的各项默认值

Action中的各项默认值

  • Action各项配置

    •  <action name="helloworld" class="com.liuyong666.action.HelloWorldAction" method="execute" >
           <result name="success">/WEB-INF/page/hello.jsp</result>
       </action>   	
      
  • Action默认配置

    •  <action name="helloworld">
           <result>/WEB-INF/page/hello.jsp</result>
       </action>
      
  • 默认值

    1. 如果没有为action指定class,默认是ActionSupport。
    2. 如果没有为action指定method,默认执行action中的execute() 方法。
    3. 如果没有指定result的name属性,默认值为success。

posted @ 2020-11-24 23:56  蜗牛互联网  阅读(96)  评论(0编辑  收藏  举报