Error in page navigation need assistance to solve

Asked By 220 points N/A Posted on -
qa-featured

Hi,

My login page navigates to next page once logged in. I want to validate it as only a single user can login. Same user name and password may valid, if the error message not displayed it means that the login details invalid. I tried it by this way.

if(this.getUserName().getValue()=="abcd" && this.getPassword().getValue()=="1234"){
userName=this.getUserName().getValue().toString();
password=this.getPassword().getValue().toString();
ADFContext.getCurrent().getSessionScope().put("userName",userName);
ADFContext.getCurrent().getSessionScope().put("password",password);
}else{
FacesMessage msg = new FacesMessage("Please check your login data");
msg.setSeverity(FacesMessage.SEVERITY_ERROR);
FacesContext.getCurrentInstance().addMessage(null, msg);
}
 
Without showing the same login page after hitting the login button, the error message is displaying. 
 
Please someone give a help to solve this.
 
Thanks a lot.
SHARE
Answered By 0 points N/A #112801

Error in page navigation need assistance to solve

qa-featured

There are few checks that the web server makes before logging each person to the website. Only if you can enter or edit these things then you will be able to achieve what you are asking for.

  1. First of all make sure that you have enough privileges in the web server to access these functions to use them or edit them.
  2. Once you get the permissions, and then go to the count feature or the class to see the available functions.
  3. Set the count for the login to 2 or anything other than the default value.
  4. What it actually does is that when one person logs in, it will set the count to 1; means the state is still valid and true as the maximum value is 2. So the second person can login as well.

Related Questions