Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

JSF-Jvav server faces

Hi guys
can anybody help me,this code is not showing me the targeted page which i define in faces-config file,no error comes.

public String loginUser()
{
if(getUserName().equals("Abhinav") && getPassword().equals("Shukla"))
return "success";

FacesContext facesContext = FacesContext.getCurrentInstance();
FacesMessage facesMessage = new FacesMessage("You have entered an invalid user name and/or password");
facesContext.addMessage("loginForm", facesMessage);

return "failure";

Sign In or Register to comment.