Tomcat 5.5 + JSF - Problems to run any application

Hello,

I'm new in JSF and try to make run a sample application from java tutorial (guessnumber).

When I type: http://localhost:8080/guessnumber/ then I get:

SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception

java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory

at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:263)

at javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)

at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)

at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641)

at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)

at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)

at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)

at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:703)

at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)

at org.apache.jsp.index_jsp._jspService(index_jsp.java:86)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

at java.lang.Thread.run(Unknown Source)

I put into WEB-INF/lib:

jsf-api.jar

jsf-impl.jar

I took them from jsf-1_2_01.

I use:

JDK 1.5.0_07

Tomcat 5.5.17

in that jars there is: javax.faces.context.FacesContextFactory. So I don't understand why I get such error.

How can I solve my problem ?

with best regards,

Rafal

[3433 byte] By [Rafala] at [2007-10-3 1:54:18]
# 1
JSF 1.2 requires a JSP 2.1 container unless you're using Facelets.Since the guessnumber application is JSP based, you'll need to run theexample in an enviroment such as GlassFish (https://glassfish.dev.java.net)which is JSP 2.1 compliant.
rlubkea at 2007-7-14 18:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Rafal,You can use Sun Java Application Server as well.
Melgarejoa at 2007-7-14 18:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
I have to use Tomcat, so I installed facelets and it works perfecly now.Thank you for help.with best regards,Rafal
Rafala at 2007-7-14 18:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Hi Rafal,Please could you show me your web.xml and faces-config.xml files.I have got the same problem on the same Tomcat release, but it still doesn't works even with Facelets config.Thank you.
dzafera at 2007-7-14 18:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Hi,

I've the same problem (tomcat 5.0.x + jsf)...

I've installed facelets but it still does not work...

(I've installed facelets lib in tomcat/server/lib and changed web.xml and server.xml according to facelets doc...)

Can you please show us your web.xml and server.xml?

Many thanks,

jc

e9500368a at 2007-7-14 18:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
I'm using Tomcat6.0.2 + JDK1.5.0_09but why I get the same trouble?!a cup of Java, cheers!Sha Jiang
jiangshachinaa at 2007-7-14 18:52:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...