NamespaceGenerally, it is better to use it when the project is complex.
In struts2 projects, namespace is usually used in the following environments:
1.In the configuration file (struts. XML) and the XX. xml file it contains
Generally, namespace is used to search for actions.
For result, the returned results are generally written as absolute paths.
At this time, if the returned result is an action and the action is not in the same namespace, we also need to write the absolute path. At this time, different namespaces and directories use the same.
2.In the connection request, for example: <a href ="Xxx/test1/Test2/a. Action"> </A>
The program will automatically query xxx/test1/Test2/for any action with a value. If yes, the program will execute it. If no action is found, search for any action in xxx/test1/and execute the action if it finds it. Follow this rule, but this rule cannot be reversed. If not, in the namespace ="/"If no action is found, an error is returned.
3.In the struts tag <s: Form>. The usage is the same as that in 2.