Tuesday, February 20, 2007

jsf newbie problem

javax.servlet.jsp.JspException: Cannot find FacesContext is often the error you got when you run a jsf enabled page for the first time. For example if you invoke a page using http://localhost:8080/yourJSFpage.jsp


Actually you should use http://localhost:8080/faces/yourJSFpage.jsp when calling the page.This is required because FacesContext is initialized when the JSF servlet controller is invoked. Or you can do http://localhost:8080/yourJSFpage.faces .

No comments: