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。
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容