Hi,
I have been using JSP and Servlet before and this is the first time I try to 
use JSF in my web application. I used MyFaces 1.1.1 and put the myfaces-all.jar 
file in WEB-INF/lib of my web application folder. I have   set my web.xml as 
below:

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd";>

<web-app>
   <!-- Faces Servlet -->   
   <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       <listener>
   </servlet>
    
   <!-- Faces Servlet Mapping -->
   <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.faces</url-pattern>
   </servlet-mapping>
</web-app> 

Then, I ran my Tomcat-5.5.15. When I inserted  
http://localhost:8080/mywebapp/test.faces to see the result, an error came  out 
:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from 
fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet threw 
exception
    
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    java.lang.Thread.run(Unknown Source)

root cause

java.lang.IllegalStateException: No Factories configured for this Application - 
typically this is because a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
  
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

    javax.faces.FactoryFinder.getFactory(FactoryFinder.java:84)
    javax.faces.webapp.FacesServlet.init(FacesServlet.java:84)
    
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
    
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
    
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    java.lang.Thread.run(Unknown Source)

note The full stack trace of the root cause is available in the Apache 
Tomcat/5.5.15 logs.
Apache Tomcat/5.5.15      

I appreciate your help.

__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

Reply via email to