Jsp web容器如何知道从何处获取默认页面?
我的Webapp位于Jsp web容器如何知道从何处获取默认页面?,jsp,tomcat,web-applications,Jsp,Tomcat,Web Applications,我的Webapp位于$HOME/workspace/WebApp01中。如果我键入localhost:8080/WebApp01,浏览器/容器如何知道必须从$HOME/workspace/WebApp01获取index.html/index.jsp?您将web.xml描述符中的这些文件定义为欢迎文件。容器(Tomcat)的默认欢迎文件列表如下所示: <welcome-file-list> <welcome-file>index.html</welcome-f
$HOME/workspace/WebApp01
中。如果我键入localhost:8080/WebApp01
,浏览器/容器如何知道必须从$HOME/workspace/WebApp01获取index.html/index.jsp?您将web.xml
描述符中的这些文件定义为欢迎文件。容器(Tomcat)的默认欢迎文件列表如下所示:
<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
index.htm
index.jsp
容器(Tomcat)用于决定加载哪个文件的规则如下:
查看更多信息。但是,当您在浏览器中键入
localhost:8080
时,您没有指定Webapp01文件夹位于$HOME/worskspace
内。那么,容器如何知道webapp驻留在$HOME/workspace/WebApp01
中呢?