Bom dia caros amigos do GUJ, estou com o seguinte problema:
Desenvolvo um sistema utilizando jsf 2 e em seu escopo uso o facelets. Não sei o que aconteceu mas quando tento executar a aplicação em qualquer browser, o browser exibe o conteúdo xml e não á página que o jsf gera:
Executando no firefox:
O documento XML não está associado a estilos. A estrutura do documento é representada abaixo.
−
<ui:composition template="/template/template.xhtml">
<h:outputStylesheet library="css" name="estilo.css"/>
<ui:define name="titulo">Tela Login</ui:define>
<ui:define name="topo">
</ui:define>
<ui:define name="menu">
</ui:define>
−
<ui:define name="conteudo">
<ui:include src="/section/operation/login.xhtml"/>
</ui:define>
<ui:define name="rodape">
</ui:define>
</ui:composition>
Executando no gchrome:
This page contains the following errors:
error on line 25 at column 16: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.
A página declarada:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
template="/template/template.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:outputStylesheet library="css" name="estilo.css" />
<ui:define name="titulo">Login</ui:define>
<ui:define name="topo">
</ui:define>
<ui:define name="menu">
</ui:define>
<ui:define name="conteudo">
<ui:include src="/section/operation/login.xhtml" />
</ui:define>
<ui:define name="rodape">
</ui:define>
</ui:composition>
O web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<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>*.xhtml</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>10</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>/view/login.xhtml</welcome-file>
</welcome-file-list>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/view/login.xhtml</location>
</error-page>
</web-app>
Alguém saberia me ajudar?
Um abraço e obrigado pela atenção.