如何设置打开域名后,打开的页面不为index.jsp

来源:百度知道 编辑:UC知道 时间:2024/09/24 09:07:28
我想让别人打开我的服务器的时候,页面为其他的页面,不为index.jsp如何设置啊?我的服务器是tomcat
我自己解决了,我把index.jsp前面又做了一个文件,叫index.htm这样默认打开的就是index.htm

很特别的问题!更改主页名称:把index.jsp改称index000.jsp,其他的也行;然后把你想要在主页显示的那一页改名为index.jsp.这种容易理解,也不用修改。

第二种:
看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>

我想现在你应该知道怎么改了吧!
<welcome-file-list>
<welcome-file>你要显示的网页.html</welcome-file>
<welcome-file>你要显示的网页.htm</welcome-file>
<welcome-file>你要显示的网页.jsp</welcome-file>
</welcome-file-list>

帮你试过了,可行!第二种方法!!

比如我修改成的是:
<welcome-file-list>
<welcome-file>adminLogin.html</welcome-file>
<welcome-file>adminLogin.htm</welcome-file>
<welcome-file>adminLogin.jsp</welcome-file>
</welcome-file-list&