使用<;时在浏览器地址栏中显示完整URL;欢迎文件>;

使用<;时在浏览器地址栏中显示完整URL;欢迎文件>;,url,jsf-2,welcome-file,Url,Jsf 2,Welcome File,我在web.xml中使用。我的欢迎文件位于faces/index.xhtml。一切正常,只是欢迎文件的完整URL没有显示在浏览器地址栏中。当我打字的时候 http://localhost:8080/hello1/ 我想在浏览器地址栏中看到 http://localhost:8080/hello1/faces/index.xhtml 如何使URL显示?下面是我的web.xml代码片段 <servlet-mapping> <servlet-name>Faces

我在
web.xml
中使用
。我的欢迎文件位于
faces/index.xhtml
。一切正常,只是欢迎文件的完整URL没有显示在浏览器地址栏中。当我打字的时候

http://localhost:8080/hello1/ 
我想在浏览器地址栏中看到

http://localhost:8080/hello1/faces/index.xhtml
如何使URL显示?下面是我的web.xml代码片段

<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
    <welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>

Facesservlet
/面孔/*
faces/index.xhtml

index.jsp
重定向到
faces/index.xhtml
:请参阅。顺便说一句,对于
/faces/*
映射,请查看。可能的重复