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: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)
692 0
|
应用服务中间件
Cannot change version of project facet Dynamic Web Module to 3.0
Cannot change version of project facet Dynamic Web Module to 3.0
|
Web App开发 安全 前端开发
A Complete ActiveX Web Control Tutorial
Download demo project - 231 Kb Introduction ActiveX is a Microsoft technology developed in the mid 90’s, that allows for the creation of applet-li...
1041 0
|
XML Java 数据库连接
Error:JDK1.8 Cannot change version of project facet Dynamic Web Module to 3.1.
问题: Error:JDK1.8 Cannot change version of project facet Dynamic Web Module to 3.1. 此工程为名为mybatis:maven webapp project:'mybatis':解决检查以下文件中配置的,参数: 解决设置1:设置\src\main\webapp\WEB-INF\web.xml &lt;?
4545 0
|
Web App开发 Java Apache
Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in
执行Maven Install打包的时候,出现以下错误信息: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.
1496 0
解决Cannot change version of project facet Dynamic web module to 2.5
情景描述:用MyEclipse 2014 打开MyEclipse 8.5 的项目,代码没有错误,项目有红叉,对一个强迫症的coder来说太难受了,找了很多资料,终于找到这篇博文帮我解决了问题,转载一下作为记录,感谢作者 原文地址:http://blog.csdn.net/steveguoshao/article/details/38414145
1480 0