Boa noite.
Acabei meu curso de Java e decidi estudar alguma outra coisa.
Peguei alguns livros de JSF e estou com esse problema no meu exemplo com HelloWorld.
Claro que é um exemplo bem simples mas se eu não rodar ele não vou poder seguir adiante.
Pesquisei no GUJ mas encontrei poucos tópicos sobre esse erro. Na internet também.
O erro pode ser simples mas não conheço.
09/07/2008 16:47:15 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Arquivos de programas\Java\jre1.6.0_04\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\MySQL\MySQL Server 5.0\bin
09/07/2008 16:47:15 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
09/07/2008 16:47:15 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2094 ms
09/07/2008 16:47:15 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
09/07/2008 16:47:16 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.26
09/07/2008 16:47:16 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
09/07/2008 16:47:20 org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\apache-tomcat-5.5.26\webapps\AvaliacaoFinal\WEB-INF\lib\jsp-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/jsp/JspPage.class
09/07/2008 16:47:24 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
09/07/2008 16:47:24 org.apache.catalina.core.StandardContext start
SEVERE: Context [/hello] startup failed due to previous errors
09/07/2008 16:47:25 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
09/07/2008 16:47:25 org.apache.catalina.core.StandardContext start
SEVERE: Context [/helloworld] startup failed due to previous errors
09/07/2008 16:47:25 org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider
INFO: No ExternalContext using fallback LifecycleProvider.
09/07/2008 16:47:25 org.apache.myfaces.config.annotation.DefaultLifecycleProviderFactory getLifecycleProvider
INFO: Using LifecycleProvider org.apache.myfaces.config.annotation.ResourceAnnotationLifecycleProvider
09/07/2008 16:47:27 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
09/07/2008 16:47:28 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
09/07/2008 16:47:28 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/140 config=null
09/07/2008 16:47:28 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
09/07/2008 16:47:28 org.apache.catalina.startup.Catalina start
INFO: Server startup in 13141 ms
package br.eti.faces;
public class HelloWorldBean {
private String message;
public HelloWorldBean() {
message = "Hello World!";
}
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return message;
}
}
<?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>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
</web-app>
<?xml version='1.0' encoding='UTF-8'?>
<!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>
<managed-bean-name>helloWorldBean</managed-bean-name>
<managed-bean-class>br.eti.faces.HelloWorldBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<body>
<f:view>
<h:form>
<h:outputText value="#{helloWorldBean.message}" />
</h:form>
</f:view>
</body>
</html>
Quando tento acessar ele diz que não está disponível.
Qualquer ajuda ou sugestão agradeço.