
Hi there is my jsf code...
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!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>Insert title here</title>
</head>
<body>
<f:view>
<b>
<h:outputText value="USER DETAILS FORM"> </h:outputText>
</b>
<p>
<h:messages style="color: blue"/>
</p>
<h:form id="UserDetail">
<h:panelGrid columns="2">
<h:outputText value="Name :"></h:outputText>
<h:inputText id="name" value="#{userBean.name}"
required="true"
requiredMessage="Please enter your Name"
validatorMessage="Please enter more than 3 characters for name">
<f:validateLength minimum="3"/>
</h:inputText>
</h:panelGrid>
<h:commandButton value="Submit" action="success"></h:commandButton>
</h:form>
</f:view>
</body>
</html>
Hello guys i have been using the above code for my welcome page which ask for user name and after submitting the form it navigate to the following page :-
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!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>Insert title here</title>
</head>
<body>
<f:view>
<h3>
<h:outputText value="Welcome"/>
<h:outputText value="#{userBean.name}"></h:outputText> To Our database.
</h3>
</f:view>
</body>
</html>
The above code is working fine in NETBEANS.. but when i run this in eclipse it stays on the first page only even after submitting the form...
I have checked it many time the navigation rules are also defined properly as folows :-
<navigation-rule>
<from-view-id>/JSF/UserDetail.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/JSF/Welcome.jsp</to-view-id>
</navigation-case>
</navigation-rule>
Pls help me finding the solution for this problem.. Thank You

Please visit the following links: