Ajuda em configura web.xml para utilizar tag jsf

0 respostas
G

Pessoal sempre que eu vou utilizar o index.jsp com tags jsf, ele dá um erro, alguém poderia mim ajudar a configurar o web.xml para que não ocorra mas esse problema.

Meu Web.xml
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

  <display-name>MyFaces Application</display-name>

  <!-- servlet -->
  <servlet>
    <servlet-name>FacesServlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <!-- servlet-mapping -->
  <!--
  <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
  -->
  <servlet-mapping>
    <servlet-name>FacesServlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>

  <!-- The Usual Welcome File List -->
    <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>index.html</welcome-file>
    </welcome-file-list>

</web-app>
Minha pagina Index.jsp
<%@page pageEncoding="Cp1252" contentType="text/html; charset=Cp1252" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Cp1252"/>
<title>Exemplo de JSF</title>
</head>
<body>
	<f:view>
		<h:form>
			<center>
				<H1>Agenda</H1>
				<br/>
				<h3>
					<h:outputLink value="buscar.jsf">
						<f:verbatim>Buscar</f:verbatim>
					</h:outputLink>
				</h3>
			</center>
		</h:form>
	</f:view>
</body>
</html>
Criado 25 de novembro de 2008
Respostas 0
Participantes 1