Error “package javax.faces.bean does not exist” at import javax.faces.bean.ManagedBean

前端 未结 4 1379
-上瘾入骨i
-上瘾入骨i 2020-12-19 02:11

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.Manag

4条回答
  •  醉酒成梦
    2020-12-19 02:50

    If you use Netbeans you can search for the library javax.faces.jar in the same folder of this application, you may find it in a folder like this: C:\Program Files\NetBeans 7.3.1\enterprise\modules\ext\jsf-2_2.

    Now, right click on yourProject/libraries in Netbeans then choose Add JAR/Folder... command to add javax.faces.jar file.

    Adding javax.faces.jar library

    From the same popup menu you can use Add Library and add Java EE from GlassFish

    Adding Java EE from GlassFish library

    Good luck.

提交回复
热议问题