my dog learned polymorphism*
The moose likes JSF and the fly likes JSF Page Navigation Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Page Navigation Problem" Watch "JSF Page Navigation Problem" New topic
Author

JSF Page Navigation Problem

A Dev
Greenhorn

Joined: Dec 17, 2010
Posts: 5
Hi,

I have a problem in Page Navigation.

I have 4 pages... login page, forgotpassword page, reset password page and main page(After login,it should go to main page). All are JSP pages.

I am using rave commands:

In Login Page:

two buttons(Login and Forgot password)
one Text field(Username)
one password field(Password)
one Panel grid(to maintain Allignment)
one message(to generate error message)

In forgot password page:

Two Text fields(Username and Email id)
one button(Reset password button)
one Panel grid(to maintain Allignment)
one message(to generate error message)

In reset password page:

Two Text fields(newpassword and confirm password)
one button(submit password button)
one Panel grid(to maintain Allignment)
one message(to generate error message)

1) In forgot password page, After validating username and Email id I should be able to enter Reset password page.
2) In Login page, After clicking on forgot password button i should be able to enter forgotpassword page.

After clicking on forgot password button in login page i am able to enter forgot password page.
But, After clicking on reset password button in forgot password page, I am unable to enter reset password page.

Navigation rules are properly set...
Managed beans are properly set...

The code is :

Reset password Button:

public String buttonResetPassword_action() {
UserDetails userDetails = getXBean().getUserDetails();
UserInfo userInfo = XDataHelper.getInstance().getUserInfo(userDetails);
if(userInfo.getIsUserValid()) {
return "forgotSuccess";
}
error(message1,"Invalid User Id and Email Combination");
return "failure";
}

Navigation rules:

navigation-rule>
<from-view-id>/forgotPasswordPage.jsp</from-view-id>
<navigation-case>
<from-outcome>forgotSuccess</from-outcome>
<to-view-id>/resetPasswordPage.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>failure</from-outcome>
<to-view-id>/forgotPasswordPage.jsp</to-view-id>
</navigation-case>

Managed Bean

<managed-bean>
<managed-bean-name>forgotPasswordPage</managed-bean-name>
<managed-bean-class>com.Y.X.forgotPasswordPage</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>


Please help me as soon as possible...


Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

Aravind,

There's a "Code" button on your message editor. You can use it to wrap Java code, XML, and other formatted text and make it easier to read.


Navigation is done to view IDs, not files, so unless you have your URL mapping in web.xml done in an unconventional way, the IDs you're coding in the "to-view-id" elements are incorrect.

Beyond that, I'll just make my standard observation that a webapp that contains its own login code is a website that can be hacked.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF Page Navigation Problem
 
Similar Threads
How to create a secure login system?
java.lang.IllegalStateException: using sendRedirect()
Table Allignment problem in IE 6.0
FacesContext is null inside managed bean
simple logic to authenticate users