I am developing some software but I am facing this issue
HTTP Status 404 - (projectName)/faces/Login.xhtml - the requested resource not available
In my office laptop it is working fine, but in my home laptop I don't know what's the problem behind this.
I tried to clear, rebuild project again and again but the problem is not going.
My other projects are running good.
here is my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>EMSLoginAndAttendanceModule</display-name>
<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>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<session-config>
<session-timeout>45</session-timeout>
</session-config>
</web-app>
this is the structure of my Login.xhtml
file
WebContent
|_META-INF
|_WEB-INF
|_faces-config.xml
|_web.xml
|_Login.xhtml
The error was because no libraries
were included in the Deployment Assembly
so after adding that error was resolved.
Steps to resolve the error:
properties
of project
than Deployment Assembly
click on Add
from right pane than select Java Build path Entries
From there I added all my libs
and error gone away.