0

I have a problem with JSF 2.2. My managerbean is not solved and this error appear. I used spring, hibernate, primefaces and tomcat.

My file directory

Error:

value="#{appBean.stockSave.adi}": Target Unreachable, identifier 'appBean' resolved to null

index.html

                        <p:outputLabel value="Name" />
                        <p:inputText value="#{appBean.stockSave.name}" />

                        <p:outputLabel value="Type" />
                        <p:inputText value="#{appBean.stockSave.type}" />

                        <p:outputLabel value="Stock No" />
                        <p:inputText value="#{appBean.stockSave.stockNo}" />

                        <p:growl id="growl" life="2000" />
                        <p:commandButton value="SEND" id="ajax" update="growl"
                            action="#{appBean.sendDatabase}"
                            styleClass="ui-priority-primary" />

appBean.java

@ManagedBean
@SessionScoped
public class appBean implements Serializable
{

    Stock stockSave = new Stock();

    public Stock getStockSave() {
        return stockSave;
    }
    public void setStockSave(Stock stockSave) {
        this.stockSave = stockSave;
    }

    public String sendDatabase()
    {

        System.out.println("Test");

        ApplicationContext appContext =
          new ClassPathXmlApplicationContext("StokTakip/BeanLocations.xml");

        StockBo stockBo = (StockBo)appContext.getBean("stockBo");

        stockBo.save(stockSave);

        return null;
    }
}
Kukeltje
  • 11,924
  • 4
  • 19
  • 44
Emre Arslan
  • 141
  • 2
  • 11
  • 2
    http://stackoverflow.com/questions/30128395/identifying-and-solving-javax-el-propertynotfoundexception-target-unreachable – Reimeus Sep 09 '16 at 14:02
  • also http://stackoverflow.com/questions/20504611/target-unreachable-identifier-resolved-to-null-in-jsf-2-2 – Reimeus Sep 09 '16 at 14:04

0 Answers0