Iniciando JSF

To tentando fazer o barato aí funcionar mas nada. Alguem pode dar uma mão.
Ambiente: windowx xp, tomcat6, java6

faces-config.xml <?xml version="1.0"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config> <managed-bean> <description>The one and only HelloBean.</description> <managed-bean-name>helloBean</managed-bean-name> <managed-bean-class>org.bruno.bean.HelloBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <navigation-rule> <description>Navigation from the hello page.</description> <from-view-id>/hello.jsp</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/goodbye.jsp</to-view-id> </navigation-case> </navigation-rule> </faces-config>

web.xml[code]<?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>
<display-name>Hello, World!</display-name>
<description>Welcome to JavaServer Faces</description>

&lt;context-param&gt;
    &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
    &lt;param-value&gt;server&lt;/param-value&gt;
&lt;/context-param&gt;

&lt;context-param&gt;
    &lt;param-name&gt;javax.faces.CONFIG_FILES&lt;/param-name&gt;
    &lt;param-value&gt;/WEB-INF/faces-config.xml&lt;/param-value&gt;
&lt;/context-param&gt;

&lt;listener&gt;
    &lt;listener-class&gt;com.sun.faces.config.ConfigureListener&lt;/listener-class&gt;
&lt;/listener&gt;

&lt;!-- Faces Servlet --&gt;
&lt;servlet&gt;
    &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
    &lt;load-on-startup&gt; 1 &lt;/load-on-startup&gt;
&lt;/servlet&gt;


&lt;!-- Faces Servlet Mapping --&gt;
&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

</web-app>[/code]

hello.jsp

&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt; &lt;%@ taglib uri=&quot;http&#58;//java.sun.com/jsf/core&quot; prefix=&quot;f&quot;%&gt; &lt;%@ taglib uri=&quot;http&#58;//java.sun.com/jsf/html&quot; prefix=&quot;h&quot;%&gt; &lt;f&#58;view&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;JSF in Action - Hello, world!&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;h&#58;form id=&quot;welcomeForm&quot;&gt; &lt;h&#58;outputText id=&quot;welcomeOutput&quot; value=&quot;Welcome to JavaServer Faces!&quot; style=&quot;font-family&#58; Arial, sans-serif; font-size&#58; 24;color&#58; green;&quot; /&gt; &lt;p&gt;&lt;h&#58;message id=&quot;errors&quot; for=&quot;helloInput&quot; style=&quot;color&#58; red&quot; /&gt;&lt;/p&gt; &lt;p&gt;&lt;h&#58;outputLabel for=&quot;helloInput&quot;&gt; &lt;h&#58;outputText id=&quot;helloInputLabel&quot; value=&quot;Enter number of controls to display&#58;&quot; /&gt; &lt;/h&#58;outputLabel&gt; &lt;h&#58;inputText id=&quot;helloInput&quot; value=&quot;#&#123;helloBean.numControls&#125;&quot; required=&quot;true&quot;&gt; &lt;f&#58;validateLongRange minimum=&quot;1&quot; maximum=&quot;500&quot; /&gt; &lt;/h&#58;inputText&gt;&lt;/p&gt; &lt;p&gt;&lt;h&#58;panelGrid id=&quot;controlPanel&quot; binding=&quot;#&#123;helloBean.controlPanel&#125;&quot; columns=&quot;20&quot; border=&quot;1&quot; cellspacing=&quot;0&quot; /&gt;&lt;/p&gt; &lt;h&#58;commandButton id=&quot;redisplayCommand&quot; type=&quot;submit&quot; value=&quot;Redisplay&quot; actionListener=&quot;#&#123;helloBean.addControls&#125;&quot; /&gt; &lt;h&#58;commandButton id=&quot;goodbyeCommand&quot; type=&quot;submit&quot; value=&quot;Goodbye&quot; action=&quot;#&#123;helloBean.goodbye&#125;&quot; immediate=&quot;true&quot; /&gt; &lt;/h&#58;form&gt; &lt;/body&gt; &lt;/html&gt; &lt;/f&#58;view&gt;

e o erro infeliz

[code]exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /web/hello.jsp at line 4

1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
3: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
4: <f:view>
5: <html>
6: <head>
7: <title>JSF in Action - Hello, world!</title>

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:515)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:408)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find FacesContext
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)
org.apache.jsp.web.hello_jsp._jspService(hello_jsp.java:97)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:384)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

[/code]
qualquer coisa ajuda nessas horas…chuta que é macumba

Seguinte…

quando vc chamar esse jsp, chame por hello.jsf , pois como vc pode ver no web.xml, a aplicação reconhecerá que é do contexto JSF tudo o que terminar por .jsf

está descrito abaixo

  &lt;!-- Faces Servlet Mapping --&gt;
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
        &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt; 

Se isso também não resolver, verifique cuidadosamente os jars da sua aplicação e se neles estão os jars do Contexto JSF.

Abraço.

Por esse erro passou mas agora ta dando outro.

Eu fiz umas mudanças no faces-config.xml no pacote dos Beans e o erro é esse

javax.servlet.ServletException&#58; javax.servlet.jsp.JspException&#58; javax.faces.el.EvaluationException&#58; javax.faces.FacesException&#58; javax.faces.FacesException&#58; Can't instantiate class&#58; 'teste.HelloBean'.. teste.HelloBean
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException&#40;PageContextImpl.java&#58;851&#41;
	org.apache.jasper.runtime.PageContextImpl.handlePageException&#40;PageContextImpl.java&#58;784&#41;
	org.apache.jsp.web.hello_jsp._jspService&#40;hello_jsp.java&#58;97&#41;
	org.apache.jasper.runtime.HttpJspBase.service&#40;HttpJspBase.java&#58;70&#41;
	javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;803&#41;
	org.apache.jasper.servlet.JspServletWrapper.service&#40;JspServletWrapper.java&#58;384&#41;
	org.apache.jasper.servlet.JspServlet.serviceJspFile&#40;JspServlet.java&#58;320&#41;
	org.apache.jasper.servlet.JspServlet.service&#40;JspServlet.java&#58;266&#41;
	javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;803&#41;
	com.sun.faces.context.ExternalContextImpl.dispatch&#40;ExternalContextImpl.java&#58;322&#41;
	com.sun.faces.application.ViewHandlerImpl.renderView&#40;ViewHandlerImpl.java&#58;130&#41;
	com.sun.faces.lifecycle.RenderResponsePhase.execute&#40;RenderResponsePhase.java&#58;87&#41;
	com.sun.faces.lifecycle.LifecycleImpl.phase&#40;LifecycleImpl.java&#58;200&#41;
	com.sun.faces.lifecycle.LifecycleImpl.render&#40;LifecycleImpl.java&#58;117&#41;
	javax.faces.webapp.FacesServlet.service&#40;FacesServlet.java&#58;198&#41;

a classe ta lá, o .class fica no diretório certo, mas ele diz que não encontra. Alguem ajuda?