JSF welcome file is not recognized [duplicate]

帅比萌擦擦* 提交于 2019-11-27 15:43:15

The <welcome-file> is supposed represent the file name of the file which is default to be loaded whenever a folder is been requested.

<welcome-file>index.xhtml</welcome-file>

If you're using JSF 2.x, then I suggest to replace /faces/* URL pattern by *.xhtml, then the above will work and you do not need to fiddle with /faces paths in URLs anymore. Or, if you're using JSF 1.x, then I suggest to replace the /faces/* URL pattern by *.jsf and provide an empty index.jsf file next to index.xhtml in the folder to fool the container that the file really exist.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!