Recently in the building Maven project, just started to configure the Welcome-file is JSP, there is no problem, and then the integration of Struts2,spring wrote a test action, when I will welcome-file to action, run found not to find the file , and then looked up a lot of information to know.
Welcome-file only to serlvet,html,jsp. And Struts2 is done with filter, so unrecognized, the solution has 3 kinds.
1. Web redirect, <welcome-file>index.jsp</welcome-file> in Welcome-file, meta write in index.jsp <meta http-equiv= " Refresh "content=" 0;url=index.action ">
2. Page jumps in the index.jsp using the Jsp:forword tab to jump to Index.action
3. Write <welcome-file>index.action</welcome-file> directly in the welcome-file of Web.xml; You can then create a index.action empty file in the root directory of your project to work properly,
Ps: Currently only under Tomcat can run (tested), jetty seemingly can not (have netizens said, not tested), suggest or use the first or second
References: http://www.jdiy.org/read.jd?id=y0hi94eg4l
http://yjshengshe.iteye.com/blog/641934