Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Elliott Jones   on Oct 18 In Java Category.

  
Question Answered By: Jeffrey Washington   on Oct 18

The sample seems to be correct  but I suggest you try another type of sample with invoking a method to verify if the other configurations of your project are correct or not.
for example  try to write a method like this and call it in your jsp page in action

public String myNavy(){
System.out.println("invoking metho myNavy...............");
return "goToNextPage";

}


In faces Config

<navigation-rule>
<from-view-id>/greeting.jsp</from-view-id>
<navigation-case>
<from-outcome>goToNextPage</from-outcome>
<to-view-id>/success.jsp</to-view-id>
</navigation-case>
</navigation-rule>



In JSP Page

<f:view>
<h:form>
<p>Enter your name: <h:inputText value="name" /></p>
<p>Enter your birthday: <h:inputText value="birthday" /></p>
<h:commandButton value="Submit" action="#{myClass.myNavy}" />
</h:form>
</f:view>


And Also you should pay attention to your web.xml and verify the filtering .*sometimes they make some problem  in navigation rules like acegi filters.

Share: