0

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>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
CodeHelp
  • 1,328
  • 5
  • 21
  • 37
  • 1
    What about having an `index.jsp` which just redirects to `faces/index.xhtml`: see [this answer](http://stackoverflow.com/q/39399/2390083). BTW as for the `/faces/*` mapping, have a look at [this answer](http://stackoverflow.com/a/7889247/2390083). – Beryllium Aug 30 '13 at 14:08
  • 1
    possible duplicate of [How to show full page URL of welcome file in address bar](http://stackoverflow.com/questions/17047451/how-to-add-page-names-to-address-bar) – BalusC Aug 30 '13 at 14:11

0 Answers0