When i add JSF
related tags to web.xml nothing is working and it gives an error. If I remove XML tags in web.xml then all .jsp and servlets are working fine. I also added jsf-api.jar,jsf-impl.jar,jstl.jar and standard.jar to lib folder of my project still it is not working so i added these jar files to lib folder in tomcat too but still it is not working.
Error1 with index.xhtml to url:
XML Parsing Error: no element found
Location: http://www.touchegolfmart.com/index.xhtml
Line Number 1, Column 1:
Erro2 with out index.xhtml to url
File not found
Firefox can't find the file at http://www.touchegolfmart.com/.
my web.xml file is
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<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>*.xhtml</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
Context path in server.xml
in conf folder of tomcat is:
<Host name="touchegolfmart.com" appBase="/home/rathan">
<Alias>www.touchegolfmart.com</Alias>
<Context path="" reloadable="true" docBase="public_html" debug="1"/>
<!-- <Context path="/manager" debug="0" privileged="true"
docBase="/usr/local/jakarta/tomcat/server/webapps/manager">
</Context>-->
</Host>
Folder structure is:
index.jsp
WEB-INF/classes
WEB-INF/lib
WEB-INF/faces-config.xml
WEB-INF/web.xml
WEB-lib/lib/jsf-api.jar,jsf-impl.jar,jstl.jar,standard.jar.
META-INF/context.xml