XHTML web.xml?

4 respostas
juniorsatanas

Pessoal por favor tem algum problema no meu xml ? para usar com xhtml ?

<?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" id="WebApp_ID" version="2.5">
  <display-name>crud_facelets</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <context-param>
   <param-name>javax.faces.DEFAULT_SUFFIX </param-name>
   <param-value>.xhtml </param-value>
</context-param>
<context-param>
   <param-name>facelets.DEVELOPMENT </param-name>
   <param-value>true </param-value>
</context-param>
<context-param>
   <param-name>com.sun.faces.validateXml </param-name>
   <param-value>false </param-value>
</context-param>
   <context-param>
   <param-name>com.sun.faces.verifyObjects </param-name>
   <param-value>true </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>*.jsf</url-pattern>
    <url-pattern>*.faces</url-pattern>
  </servlet-mapping>
  
  <context-param>
		<param-name>org.ajax4jsf.SKIN</param-name>
		<param-value>blueSky</param-value>
	</context-param>
	<filter>
		<display-name>Ajax4jsf Filter</display-name>
		<filter-name>ajax4jsf</filter-name>
		<filter-class>org.ajax4jsf.Filter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>ajax4jsf</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>INCLUDE</dispatcher>
	</filter-mapping>
	
	<filter>
	    <display-name>AuthFilter</display-name>
	    <filter-name>AuthFilter</filter-name>
	    <filter-class>br.com.serjaum.filtro.AuthFilter</filter-class>
    </filter>
    <filter-mapping>
	    <filter-name>AuthFilter</filter-name>
	    <url-pattern>/*</url-pattern>
    </filter-mapping>
	 
	 <context-param>
		<param-name>facelets.SKIP_COMMENTS</param-name>
		<param-value>true</param-value>
	</context-param>
</web-app>

4 Respostas

Jair_Rillo_Junior

Qual erro que acontece quando você chama sua página JSF?

juniorsatanas

Jair Rillo Junior tudo bom ? ta meio sumido !

Não aparece nada !

Jair_Rillo_Junior

Você tem algum arquivo index.html ou index.jsp? Se sim, eles serão executados quando você entrar com a URL no seu browser (por causa da entrada welcome-file no web.xml
Outro detalhe é em relação ao XHTML. Lembre-se que você deve chamar o arquivo usando a extensão .jsf ou .faces (de acordo com seu web.xml), por exemplo

http://localhost:8080/teste.jsf

Em teoria tem que aparecer algo. Dê um olhada no console para ver se não gerou alguma exception.

[]'s

juniorsatanas

Obrigado Jair !

Agora foi !

Criado 2 de fevereiro de 2010
Ultima resposta 2 de fev. de 2010
Respostas 4
Participantes 2