JSF Note

简介:
Exception One:
 
InBlock.gifjava.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:danni-505@hotmail.com



    本文转自danni505 51CTO博客,原文链接:http://blog.51cto.com/danni505/162913,如需转载请自行联系原作者



相关文章
|
Java Maven
Maven打包出现webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
Maven打包出现webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
481 0
How does framework interpret $expand=Notes
Created by Wang, Jerry, last modified on Dec 31, 2014
How does framework interpret $expand=Notes
|
前端开发
why my employee binding does not work - important MVC debug
Created by Wang, Jerry, last modified on May 20, 2015
95 0
why my employee binding does not work - important MVC debug
|
Web App开发
where and when navigation target url is retrieved by SAP UI5 Framework
Created by Jerry Wang, last modified on Jan 17, 2015
where and when navigation target url is retrieved by SAP UI5 Framework