xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"> <display-name>xss</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp </welcome-file> </welcome-file-list> </web-app> 此时 http://xmlns.jcp.org/xml/ns/javaee 和 http://xmlns.jcp.org
<welcome-file-list> <welcome-file>index.html</welcome-file> <! -- 设置访问首页,index.html可以改成你要进入的网站首页--> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp </welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file > <welcome-file>default.jsp</welcome-file> </welcome-file-list> <servlet> <description></
="WebApp_ID" version="3.1"> <display-name>CXFWebservice</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file >default.jsp</welcome-file> </welcome-file-list> <context-param> <param-name>contextConfigLocation
>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp </welcome-file> </welcome-file-list> 然后重启Tomcat。 找到tomcat目录下的conf/web.xml文件,修改首页: <welcome-file-list> <welcome-file>HaCresume.html</welcome-file > <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <
WebApp_ID" version="3.1"> <display-name>JavaWeb_HelloWord</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file >default.jsp</welcome-file> </welcome-file-list> <!
我们在写安全性较高的网站时必然会对网站的入口进行限制, 而在这其中其关键作用的就是网站的根目录下WEB-INF中的web.xml中 <welcome-file-list> <welcome-file >index.jsp</welcome-file> </welcome-file-list> 它的作用就是定制首页,你也可能会问我想定制多个行吗? 答案是可以的 <welcome-file-list> <welcome-file>index.jsp</welcome-file> <welcome-file>myjsp.jsp</welcome-file
找到tomcat目录下的conf/web.xml文件,修改首页: <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp </welcome-file> </welcome-file-list> 然后重启Tomcat。
3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>QQ</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file >default.jsp</welcome-file> </welcome-file-list> </web-app> welcome-file-list表示项目的欢迎页。
"WebApp_ID" version="3.0"> 3 <display-name>web02</display-name> 4 <welcome-file-list> 5 <welcome-file >index.html</welcome-file> 6 <welcome-file>index.htm</welcome-file> 7 <welcome-file>index.jsp </welcome-file> 8 <welcome-file>default.html</welcome-file> 9 <welcome-file>default.htm</welcome-file > 10 <welcome-file>default.jsp</welcome-file> 11 </welcome-file-list> 12 <servlet> 13 <
WebApp_ID" version="3.0"> 3 <display-name>Controller</display-name> 4 <welcome-file-list> 5 <welcome-file >index.html</welcome-file> 6 <welcome-file>index.htm</welcome-file> 7 <welcome-file>index.jsp </welcome-file> 8 <welcome-file>default.html</welcome-file> 9 <welcome-file>default.htm</welcome-file > 10 <welcome-file>default.jsp</welcome-file> 11 </welcome-file-list> 12 13 </web-app> login.jsp
WebApp_ID" version="3.1"> <display-name>JavaWeb_HelloWord</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file >default.jsp</welcome-file> </welcome-file-list> <!
version="3.1"> 3 <display-name>springMVC01_20170408</display-name> 4 <welcome-file-list> 5 <welcome-file >index.html</welcome-file> 6 <welcome-file>index.htm</welcome-file> 7 <welcome-file>index.jsp </welcome-file> 8 <welcome-file>default.html</welcome-file> 9 <welcome-file>default.htm</welcome-file > 10 <welcome-file>default.jsp</welcome-file> 11 </welcome-file-list> 12 13 <!
_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>SpringMVC</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp </welcome-file> </welcome-file-list> <context-param> <param-name>contextConfigLocation</param-name> <
>index.html</welcome-file> 6 <welcome-file>index.htm</welcome-file> 7 <welcome-file>index.jsp </welcome-file> 8 <welcome-file>default.html</welcome-file> 9 <welcome-file>default.htm</welcome-file >index.html</welcome-file> 6 <welcome-file>index.htm</welcome-file> 7 <welcome-file>index.jsp </welcome-file> 8 <welcome-file>default.html</welcome-file> 9 <welcome-file>default.htm</welcome-file > 10 <welcome-file>default.jsp</welcome-file> 11 </welcome-file-list> 12 13 <!
servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file >default.jsp</welcome-file> </welcome-file-list> </web-app> 上面代码中标识的 springmvc 为前端控制器 4.
" id="WebApp_ID" version="3.0"> <display-name>SpringMVC</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file >default.jsp</welcome-file> </welcome-file-list> <context-param> <param-name>contextConfigLocation
version="3.0"> 3 <display-name>struts2_20170219</display-name> 4 <welcome-file-list> 5 <welcome-file >index.html</welcome-file> 6 <welcome-file>index.htm</welcome-file> 7 <welcome-file>index.jsp </welcome-file> 8 <welcome-file>default.html</welcome-file> 9 <welcome-file>default.htm</welcome-file > 10 <welcome-file>default.jsp</welcome-file> 11 </welcome-file-list> 12 13 14 <!
id="WebApp_ID" version="3.0"> <display-name>java520.top</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file >default.jsp</welcome-file> </welcome-file-list> </web-app> 在pom文件中添加上SpringBoot的父依赖: <parent>
"WebApp_ID" version="3.0"> 3 <display-name>web02</display-name> 4 <welcome-file-list> 5 <welcome-file >index.html</welcome-file> 6 <welcome-file>index.htm</welcome-file> 7 <welcome-file>index.jsp </welcome-file> 8 <welcome-file>default.html</welcome-file> 9 <welcome-file>default.htm</welcome-file > 10 <welcome-file>default.jsp</welcome-file> 11 </welcome-file-list> 12 <servlet> 13 <servlet-name
WebApp_ID" version="3.1"> <display-name>yqb_test_webserver</display-name> <welcome-file-list> <welcome-file >index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file > <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file >default.jsp</welcome-file> </welcome-file-list> <servlet> <description>This is the description