本文介绍了错误“程序包javax.faces.bean不存在".在导入javax.faces.bean.ManagedBean时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在从 Oracle在线教程学习JSF.在netbeans上构建示例"hello1"时,在行import javax.faces.bean.ManagedBean;
处给出以下错误:
I am studying JSF from Oracle online tutorial. While building its example "hello1" on netbeans it gives the following error at the line import javax.faces.bean.ManagedBean;
:
这是怎么引起的,我该如何解决?
How is this caused and how can I solve it?
推荐答案
您必须将javax.faces.api jar文件添加到您的项目中.您可以在此处找到该库.
You have to add javax.faces.api jar file to your project.You can find this library here.
下载此文件后,您必须将其导入到项目中并将其添加到工件中.
After downloading this file, you have to import that into your project and add it to your artifact.
这篇关于错误“程序包javax.faces.bean不存在".在导入javax.faces.bean.ManagedBean时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!