我有两个文件 - 1) JSP 文件 2) HTML 文件
每当我运行项目时,jsp 都会首先执行。我怎样才能先运行 HTML 呢?
更改 web.xml 文件的结构:
<welcome-file-list>
<welcome-file>Name of the html file</welcome-file>
</welcome-file-list>
在web.xml
您可以提供您需要首先显示的文件。
默认情况下,它是下面的一个。
<welcome-file>index.html</welcome-file>
所以在这里给你的 html 文件名。
<welcome-file>MyHtml.html</welcome-file>