input.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<f:view>
<t:saveState value="#{test}"></t:saveState>
<h:form>
<h:inputText value="#{test.id}" id="id"></h:inputText>
<h:inputText value="#{test.password}" id="password"></h:inputText>
<h:commandButton value="GO" action="go"></h:commandButton>
</h:form>
</f:view>
</body>
</html>
output.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<f:view>
<t:saveState value="#{test}"></t:saveState>
<h:form>
<h:outputText value="#{test.id}"></h:outputText>
<h:outputText value="#{test.password}"></h:outputText>
<h:commandButton value="BACK" action="back"></h:commandButton>
</h:form>
</f:view>
</body>
</html>test就是一个简单的属性类...
其中test的scope是request...
跳转之后为什么test里面的值都是空的呢....