When using struts, you sometimes need to use index. Do to obtain data and then display it in index. jsp of the Home Page. In this case, you need to set index. Do as the home page. However, because the welcome page in Web. xml must be a physical file configured with welcome-file, Tomcat will not continue to process the homepage such as index. Do, but return 404 directly.
According to a comment in Tomcat:
When a request URI refers to a directory, the default servlet looks for a "Welcome file" within that directory and, if present, to the corresponding resource URI for display.
That is to say, as long as Tomcat finds a physical file with such a name, it will go to the following for further processing. It is easy to create an empty file in the directory named index. do (a little fool Tomcat), everything is done!
<Welcome-file-List> <welcome-File> test. DO </welcome-File> </welcome-file-List>