Show full URL in browser address bar when using <welcome-file>

817 Views Asked by At

I am using <welcome-file> in web.xml. My welcome file is at faces/index.xhtml. Everything is working fine except that the full URL for the welcome file is not shown in browser address bar. When I type in

http://localhost:8080/hello1/ 

I want to see in browser address bar

http://localhost:8080/hello1/faces/index.xhtml

How do I get the URL to appear? Here's my web.xml code fragment

<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>
0

There are 0 best solutions below