由于之前经常使用springboot框架,最近的一个项目中使用到了ssm框架,需要更改web默认页面,web服务器为tomcat,环境为idea
首先找到项目中的web.xml文件
进入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页面设置为web默认页面,则在上面的代码中配置相关的信息。
最后在idea中重新启动tomcat,web默认页面就会修改为index页面。