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
For gradle :
'com.sun.faces:jsf-api:2.2.8'
'com.sun.faces:jsf-impl:2.2.8'
Add these 2 dependency in your project's pom.xml file
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7</version>
</dependency>
This will solve your dependency problem.
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.
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.