Index.jsp -> teste.xhtml

0 respostas
I

Pessoal,

Tenho uma pagina index.jsp e outra teste.xhtml ... como faço para na abertura da index.jsp seja redirecionado para abrir a teste.xhtml?

web.xml

<?xml version="1.0"?>
<web-app version="2.5" 
                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_2_5.xsd">
	<display-name>SieManagementWebRichFaces</display-name>
	  
	<context-param>
	   <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
	   <param-value>server</param-value>
	</context-param>
	   
	<context-param>
	   <param-name>org.richfaces.SKIN</param-name>
	   <param-value>blueSky</param-value>
	</context-param>
	
	 
	 <!--
	<context-param>
	<param-name>org.richfaces.LoadStyleStrategy</param-name>
	<param-value>NONE</param-value>
	</context-param>
	 -->
	
	<context-param>
	      <param-name>org.richfaces.CONTROL_SKINNING</param-name>
	      <param-value>enable</param-value>
	</context-param>
	 
	<filter> 
	   <display-name>RichFaces Filter</display-name> 
	   <filter-name>richfaces</filter-name> 
	   <filter-class>org.ajax4jsf.Filter</filter-class> 
	</filter> 
	
	<filter-mapping> 
	   <filter-name>richfaces</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>
 
	<!-- Faces Servlet -->
	<servlet>
	   <servlet-name>Faces Servlet</servlet-name>
	   <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
	   <load-on-startup>1</load-on-startup>
	</servlet>
 
	<!-- Faces Servlet Mapping -->
	<servlet-mapping>
	   <servlet-name>Faces Servlet</servlet-name>
	   <url-pattern>*.jsf</url-pattern>
	</servlet-mapping>
	
	<login-config>
	   <auth-method>BASIC</auth-method>
	</login-config>
	   
	<welcome-file-list>
      <welcome-file>index.jsp</welcome-file> 
    </welcome-file-list>
	   
	</web-app>

faces-config.xml

<?xml version="1.0" encoding="UTF-8"?>

<faces-config
    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-facesconfig_1_2.xsd"
    version="1.2">

	
	<navigation-rule> 
	<from-view-id>/index.jsp</from-view-id> 
	<navigation-case> 
	<from-outcome>teste</from-outcome> 
	<to-view-id>/teste.xhtml</to-view-id> 
	</navigation-case> 	
	</navigation-rule> 
	
	
	
</faces-config>

Desde ja agreço!

Criado 23 de março de 2011
Respostas 0
Participantes 1