Bom dia, ao tentar associar a ação de gravar na action do botão gravar, aparece erro no console. javax.el.PropertyNotFoundException: /livro.xhtml @24,67 action="#{livroBean.gravar}": Target Unreachable, identifier 'livroBean' resolved to null
livro.xhtml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:body>
<h1>Novo Livro</h1>
<h:form>
<fieldset>
<legend>Dados do Livro</legend>
<h:panelGrid columns="2">
<h:outputLabel value="Titulo:" for="titulo"/>
<h:inputText id="titulo"/>
<h:outputLabel value="ISBN:" for="isbn"/>
<h:inputText id="isbn"/>
<h:outputLabel value="Preço:" for="preco"/>
<h:inputText id="preco"/>
<h:outputLabel value="Data de Lançamento:" for="dataLancamento"/>
<h:inputText id="dataLancamento"/>
<h:commandButton value="Gravar" action="#{livroBean.gravar}"/>
</h:panelGrid>
</fieldset>
</h:form>
</h:body>
</html>
LivroBean.java
package br.com.caelum.livraria.bean;
import javax.faces.bean.ManagedBean;
@ManagedBean
public class LivroBean {
public void gravar() {
System.out.println("Gravando livro");
}
}