Error: /login.xhtml Not Found in ExternalContext as a Resource

纵饮孤独 提交于 2019-12-03 06:18:00
BalusC

You made 2 mistakes.

  1. /WEB-INF folder is for configuration files, include files, template files, tag files, etc, which are supposed to be hidden from direct access, not for publicly accessible files. Put publicly accessible files outside /WEB-INF folder.

  2. /faces folder should not be used at all. A virtual /faces/* URL pattern on FacesServlet doesn't imply that you should have a physical folder like that. Remove it.

So, all with all, just

WebContent
 |-- META-INF
 |-- WEB-INF
 |    |-- faces-config.xml
 |    `-- web.xml
 `-- login.xhtml

and

<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>

and

http://localhost:8080/clientAccountManager/login.xhtml

should do.

See also:

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