A Dev

Greenhorn
+ Follow
since Dec 17, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by A Dev

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...


10 years ago
JSF

Matthew Brown wrote:Another reason to add to Paul's list: you have a servlet specific setting; you make it available to all servlets as a context parameter; somebody else decides to use it in another servlet; you need to change the value...you've just broken the other servlet.



Hey Methew...

Your answer sounds like giving a string point...but, I didn't understand it clearly... Can you elaborate it.
10 years ago
Thank you paul... your explanation is pretty clear. your answer echoed as best possible answer at this moment for my Question.

10 years ago

damodar kumar wrote:context param is for entire session of client so if you keep unnecessary things there it will become overhead for application
inti param is for that particular request or response

you need to differentiate where and when we can use those.




Init-param is for specific servlet and context-param is for entire appln.... eve i too know this.

but, what i want to know is when there is context-param, why do we need init-param??? Context-param scores over init-param by being available entire appln. ....

init-param is used when it required for specific servlets.... why can't we use context-param here??? will it be overhead for Appln. if we use context-param??? if so, what sort of over-head???
10 years ago
Hey..

When do we use Init-params nad not context-params. please explain this with example.

I know the difference between them, but when there are Context-params, why do we need init-params??? using Context-params are always better than init-params as Entire Appln. can use it.
10 years ago