• Post Reply Bookmark Topic Watch Topic
  • New Topic

FacesServlet not found  RSS feed

Raaga Maalika
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, am a newbie to JSF. Through pom.xml, I'm using the following jar files in my app:

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"

<html xmlns="http://www.w3.org/1999/xhtml"

<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>

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
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
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?
Tim Holloway
Posts: 18531
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your JSF SimplePage seems to be OK. Why it is that FacesServlet isn't found at all isn't apparent to me, but it does look like you're mixing a JSF 1.2 implementation with a JSF2 api definition and I don't think that's likely to work too well.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!