Hi, am a newbie to
JSF. Through pom.xml, I'm using the following jar files in my app:
jsf-impl-1.2-b19.jar
javax.faces-api-2.1.jar
I have written a simple JSF page called simplePage.jsp under 'src/webapp/' dir. This is the content of simplePage.jsp:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<f:view>
<h:form>
<h:graphicImage id="Cognizant" value="CognizantScala.JPG"></h:graphicImage>
<h:graphicImage id="bookworm" value="Bookworm.gif"></h:graphicImage>
<h2>Hi. Welcome to the Book Application</h2>
</h:form>
</f:view>
</html>
When I start the app using the command (jetty server) :
>mvn jetty:run
Jetty throws an error saying :
2011-09-05 16:30:10.187:WARN::EXCEPTION
java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:392)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:363)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
...
...
Why is it saying that the 'FacesServlet' isn't found, despite me including the api & impl jar files? How do I handle this? Can someone please help?