Struts2 method = "{1 }"

Source: Internet
Author: User

Here {1} indicates receiving the values sent from the previous action through wildcards. For example, you configured <action name = "* crud" class = "example. crud "method =" {1} ">, and then call ***/editcrud. action, the value obtained in the method is edit, and the Edit Method in this action will be called. The method wildcard in action sometimes satisfies certain rules for calling methods in the action, for example, the edit action corresponds to the Edit Method and the delete action corresponds to the delete method. In this case, you can use a method wildcard, for example, <action name = "* crud" class = "example. crud "method =" {1} "> in this case, the reference of editcrud action will call the Edit Method. Similarly, the reference of deletecrud action will call the delete method. Another common method is to use underscores to separate data. For example, <action name = "crud _ *" class = "example. crud "method =" {1} "> in this way, you can find the corresponding method when you encounter the following call. "Action = crud_input" => Input Method "Action = crud_delete" => the delete method wildcard has the same status as the common configuration and can be used together with all other functions of the framework.

References: http://yjph83.blog.163.com/blog/static/551475792008520101617770 /#


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.