Struts2 default namespace and root namespace

Source: Internet
Author: User

The default namespace"Namespace = ""
",
Root namespace
"Namespace = "/"
".

<Package name = "test" extends = "struts-Default">
If no namespace is specified, the default namespace is
"Namespace = ""
".

by default, actions in a namespace can process action requests in any namespace. For example, if the URL is/barspace/bar. action request, and the/barspace namespace does not have an action named bar, the action named bar under the default namespace will also process the user request. However, the action in the root namespace only processes the action requests in the root namespace. This is the difference between the root namespace and the default namespace.
The namespace has only one level. If the requested URL is/bookservice/search/get. action. The system first searches for the get action in the/bookservice/search namespace. If the get action is found in the namespace, this action is used to process user requests. if not found, the system will directly go to the default namespace to find the get action, instead of looking for an action named get
In the/bookservice namespace.

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.