I have a JSF 2.0 with mojara EL 2.2 on tomcat 6 and had it working for some time now during the development. I recently added a form with a command button for login (basic stuff) which checks the username and password in the managed bean at the action doLogin.
public String doLogin(){
FacesMessage message = null;
if((username.equals("user"))&&(password.equals("pass")))
return "testpage.xhtml";
else
message = new FacesMessage("Invalid username or password");
FacesContext.getCurrentInstance().addMessage(null, message);
return null;
}
The problem is that after it goes through doLogin and returns "testpage.xhtml" the same page is displayed. Even though I have all xhtml's file in the root of WebContent.
In the console of tomcat I get:
The ELResolvers for JSF were not registered with the JSP container.
Passing parameters using EL 2.2 work fine.
I'm using JSF with Facelets.