Xhtml ou jsp nao renderiza o jsf 1.2

3 respostas
S
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">



<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      lang="pt-br">
    <h:body>
        <h:form>
            <h:panelGrid columns="2">
                Marca: <h:inputText /><br/> 
                Modelo: <h:inputText /><br/>
                Ano de Fabricacao: <h:inputText /><br/>
                Ano de Modelo: <h:inputText /><br/>
                Obs: <h:inputTextarea /><br/>

                <h:commandButton value="salvar" />
            </h:panelGrid>
        </h:form>
    </h:body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <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>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>forwardToJSF.jsp</welcome-file>
    </welcome-file-list>
</web-app>

Ele abre a pagina exibe os textos mas nao carrega os inputs, inseri as libs jstl e jsf corretamente.

Falta fazer mais algo para carregar ?

3 Respostas

S

criei como jsp tambem e nao carregou.

Hebert_Coelho

xhtml é apenas para JSF 2.0

Você está chamando sua página por qual URL?

S

assim

<%@page pageEncoding="UTF-8"%>

<%--
    This file forwards to the entry of JavaServer Faces application.
    See <welcome-file-list> in web.xml file.
--%>

<jsp:forward page="welcomeJSF.jsp"/>

Ai ele abre a welcomeJSF.jsp porém so com os texto sem os inputs

Criado 14 de outubro de 2012
Ultima resposta 14 de out. de 2012
Respostas 3
Participantes 2