Configure the Web. xml file:
1. No matter how many sub-applications are included in the application, you only need to configure an actionservlet. Configuring multiple actionservlet classes to process different functions in an application is not necessary because the servlet itself supports multithreading. In addition, the current Struts framework allows only one actionservlet to be configured in the application.
2. Configure the welcome file list. I can see that I am thinking about it. Why should I have multiple welcome pages? How do I call these multiple pages? It turns out to be like this: The element can contain multiple Sub-element. The call starts from the first specified file in the photo. If the file exists, the file will be returned to the customer. If the file does not exist, search for the file on the next welcome page in sequence, until it is found; if all files do not exist, the server returns the error message "HTTP 404 Not Found" to the client.
3. In Servlet ing cannot be configured in the element, so the struts action cannot be used as the welcome file directly. However, you can configure a Global Forwarding item.
Configure multiple application modules:
1. Create a separate struts configuration file for each sub-application;
2. Configure actionservlet in Web. xmlCodeTo add information for each sub-application;
3. Use Element or switchaction class to switch between sub-applications.
Switch between multiple application modules:
For example, switch from the default module to moduleb:
Http: // localhost: 8080/tomodule. do? Prefix =/moduleb & page =/index. Do
Switch from moduleb to default module:
Http: // localhost: 8080/tomodule. do? Prefix = & page =/index. Do
This application has not been used yet, but it can be seen in books that it can improve development efficiency.
And better management of projects, can be developed in parallel, but do not know how to solve some intersections