JSF Note

Exception One:
 
java.lang.RuntimeException: Cannot find FacesContext
 
This reason main locate at your web.xml, beacuse jsf will use FacesServlet to connect jsf/faces  and jsp, so when load the jsp directly, it will be show this exception.
 
The resolve main have three ways, in here just talk one of them, which is use another page like home.jsp and in it have the code like
 
<jsp:forward page= "index.jsf" />
  
and web.xml default file point to home.jsp, in other word, use home.jsp to redirect to httpdRequest to jsf or faces.
 
 
Exception Two:
 
Unable to create managed bean
 
It may appear in some eclipse users, at first, please see your .war package, wether the class real exist!! because the exception tell you which not be found.
 
And i guess you are using eclipse and jboss, so take a look at  your JSF project, there are an ant directory, which include bulid.properties and build.xml, so you should use ant to build your project then deploy the war to container.
 
Ok, this time i think everything will be ok, if you still have  problem, tell me by msn:[email protected]

你可能感兴趣的:(职场,休闲)