Overview of the order of search paths for STRUTS2 requested URLs

Source: Internet
Author: User

1. Obtain the URI of the request path, for example the URL is: http://localhost:8080/struts2-01/path1/path2/path3/student.action

2. First look for the package namespace for/path1/path2/path3, if it does not exist, then perform step 3; if it exists, look for an action with the name student in it. When the action is not found under the package, it runs directly to the default namespace package for action (the default namespace is the empty string ""), and if the action is not available in the default namespace package, The page will prompt for no action.

3. Look for the package namespace for/path1/path2, if the package does not exist, perform step 4 if there is a green font in step 2.

4. Look for the package namespace for/path1, if the package does not exist, perform step 5 if there is a green font in step 2.

5. Look for the namespace/package, and if this package exists, look for an action named student in this package, when the action is not found in the package or the package does not exist. Will go to the default namespace package inside the search for actin, if not found, the page will be prompted to find the action.

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.