高分请教:JSF为什麽无法跳转
braig 2007-06-20 03:13:39 不知道为什麽总是跳转到当前页面,非常郁闷,高分请求指点,谢谢!!
代码:
search.jsp
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@page contentType="text/html;charset=utf-8"%>
<html>
<head>
<title>search</title>
</head>
<body>
<f:view>
<h:form>
<h:commandButton value="发送" action="login"/>
</h:form>
</f:view>
</body>
</html>
resultset.jsp
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@page contentType="text/html;charset=utf-8"%>
<html>
<head>
<title>ok</title>
<link href="styles.css" rel="stylesheet" type="text/css"/>
</head>
<body>
ok!!
</body>
</html>
faces-config.xml
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
<faces-config>
<navigation-rule>
<from-view-id>/web/pages/index.jsp</from-view-id>
<navigation-case>
<from-outcome>login</from-outcome>
<to-view-id>/web/pages/resultset.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
给出答案立刻给分,谢谢!!