关于程序员: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。

评论

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理