• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FacesServlet not found

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic