Bravox 15 de set. de 2009
vc está usando facelets ?
coloca ai o seu web.xml.
rossan 15 de set. de 2009
bravox
estou usando jsf puro
aqui esta meu 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" id= "WebApp_ID" version= "2.5" >
<display-name> aplicacaoTeste</display-name>
<listener>
<listener-class> com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<listener>
<listener-class> com.sun.faces.application.WebappLifecycleListener</listener-class>
</listener>
<context-param>
<description> Necessário para o JBoss 4.2.0 ou superior.</description>
<param-name> org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</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> *.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file> index.html</welcome-file>
</welcome-file-list>
</web-app>
e aqui esta meu faces-config
<?xml version="1.0" encoding="UTF-8"?>
<faces-config version= "1.2" xmlns= "http://java.sun.com/xml/ns/javaee"
xmlns:xi= "http://www.w3.org/2001/XInclude"
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-facesconfig_1_2.xsd" >
<managed-bean>
<managed-bean-name> loginDelegate</managed-bean-name>
<managed-bean-class>
br.com.softek.aplicacaoteste.delegate.LoginDelegate
</managed-bean-class>
<managed-bean-scope> request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id> *.faces</from-view-id>
<navigation-case>
<from-outcome> index</from-outcome>
<to-view-id> /index.html</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome> menu</from-outcome>
<to-view-id> /menu/menu.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome> redirecionaLogin</from-outcome>
<to-view-id> /login/login.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Bravox 15 de set. de 2009
Faz assim e ve se rola !
troca a sua index.html por index.jsp e add somente essa linha:
<% response . sendRedirect ( "/login/login.faces" ); %>
No web.xml
// ...
<welcome-file-list>
<welcome-file> index.jsp</welcome-file>
</welcome-file-list>
Qualquer coisa estamos ai !
rossan 15 de set. de 2009
bravox eu testei isso mais não deu certo, tem alguma outra sugestão
Bravox 15 de set. de 2009
robsonsan 16 de set. de 2009
Bravox consegui resolver brother valeu mesmo pela sua ajuda mano vou colocar aqui caso alguém tenha o mesmo problema que eu…
Acho que o problema era que: como estou usando pagina XHTML tenho que usar facelets e não tinha nada de facelets configurado no meu xml nem os jar na aplicação
Dica para Galera eu não sabia que eu poderia ter conflito de jar na aplicação e o JBoss 4 que estou usando estava dando erro na aplicação então caso tenha um
problema com o meu vai essa dica ai para poder verificar se os jar que forem add estão corretos.
valeu
<?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> aplicacaoTeste</display-name>
<context-param>
<param-name> org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value> com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<context-param>
<param-name> facelets.DEVELOPMENT</param-name>
<param-value> true</param-value>
</context-param>
<context-param>
<param-name> org.richfaces.SKIN</param-name>
<param-value> blueSky</param-value>
</context-param>
<!-- JSF -->
<context-param>
<param-name> javax.faces.DEFAULT_SUFFIX</param-name>
<param-value> .xhtml</param-value>
</context-param>
<context-param>
<param-name> javax.faces.STATE_SAVING_METHOD</param-name>
<param-value> server</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>
<listener>
<listener-class> com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<context-param>
<description> Necessário para o JBoss 4.2.0 ou superior.</description>
<param-name> org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</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> *.faces</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file> index.html</welcome-file>
</welcome-file-list>
</web-app>