I'm using JSF 2.2 and OmniFaces ExtensionlessURLs to remove the file extensions from my URLs:
www.exmaple.com/appname/login.xhtml -> .../appname/login
.
Now when I navigate to www.example.com/appname/
I always get forwarded to www.exmaple.com/appname/login
. Is it possible to prevent this redirect and to instead serve login.xhtml
from www.example.com/appname/
?
My .xhtml-files are stored in /WebContent/html/
.
Relevant details from my web.xml:
<welcome-file-list>
<welcome-file>login.xhtml</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>-1</load-on-startup>
<enabled>true</enabled>
<async-supported>false</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<context-param>
<param-name>org.omnifaces.FACES_VIEWS_SCAN_PATHS</param-name>
<param-value>/html/*.xhtml</param-value>
</context-param>