Iniciei uma aplicaçãozinha com Jsf que está funcionando perfeitamente, até o momento em que eu incluo a tag na navegação. Conforme codigo abaixo.
Ao clicar no botão “Vai Para Representantes”, ao invés de enviar para a página “representante.jsp”, a tela apenas pisca e permanece em cliente.jsp incluindo no browser a sessão: http://localhost:8080/jsf3/faces/;jsessionid=E9E852B9EE5DE8426924F7305BB7D85E
Gostaria de saber o detalhe que estou deixando de observar, e se possível, porque aparece a id da sessão no browser, mesmo os beans configurados como “scope request” e não “session”? Obrigado!
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">
<managed-bean>
<managed-bean-name>clienteMB</managed-bean-name>
<managed-bean-class>br.com.teste.mb.ClienteMB</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>representanteMB</managed-bean-name>
<managed-bean-class>br.com.teste.mb.RepresentanteMB</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/cliente.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/representante.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
cliente.jsp
<%@ page contentType="text/html; charset=ISO-8859-1" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>cliente.jsp</title>
</head>
<body>
<h:form>
<h:commandButton value="Vai Para Representantes" action="success" />
</h:form>
</body>
</html>
</f:view>
representante.jsp
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Representante</title>
</head>
<body>
representante.jsp
</body>
</html>