I'm new to Java-ee development, and I'm really confused about this. In fact i wanna to import file using jsf and save this file in a directory but i got always Target Unreachable. this is my bean:
@ManagedBean
@RequestScoped
public class Import_2G {
    //@EJB
    //private GestionCellRef2GLocal gestionCellRef2GLocal;
    private UploadedFile uploadedFile;
    public void save() throws IOException {
        //GestionCellRef2GRemote t = null;
        Path folder = Paths.get("C:\\Upload");
        String filename = FilenameUtils.getBaseName(uploadedFile.getFileName());
        String extension = FilenameUtils.getExtension(uploadedFile.getFileName());
        Path file = Files.createTempFile(folder, filename + "-", "." + extension);
        //try (InputStream input = uploadedFile.getInputstream()) {
          //  Files.copy(input, folder, StandardCopyOption.REPLACE_EXISTING);
            if (file != null) {
                FacesMessage message = new FacesMessage("Succesful", file.getFileName() + " was uploaded.");
                FacesContext.getCurrentInstance().addMessage(null, message);
            }
}
}
and this is the xhtml file :
   <ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:f="http://xmlns.jcp.org/jsf/core"
    xmlns:h="http://xmlns.jcp.org/jsf/html"
    xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
    xmlns:jsf="http://xmlns.jcp.org/jsf"
    xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
    xmlns:p="http://primefaces.org/ui"
    template="/WEB-INF/template/template.xhtml">
<ui:define name="title">2G</ui:define>
    <ui:define name="content">
    <h:form>
    <h1> <font color="orange" size="7" > 2G</font></h1> 
    </h:form>
    <h2 >Choose 2 files </h2>
    <h:form>
            <p:fileUpload fileUploadListener="#{Import_2G.save()}"
                mode="advanced" dragDropSupport="true" update="messages"
                sizeLimit="100000000000" allowTypes="/(\.|\/)(xls)$/" />
            <p:growl id="messages" showDetail="true" />
        </h:form>
    </ui:define>
</ui:composition>
and this is the errors that i got :
WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (default task-55) /admin/2g.xhtml @23,61 fileUploadListener="#{Import_2G.save()}": Target Unreachable, identifier 'Import_2G' resolved to null: javax.el.PropertyNotFoundException: /admin/2g.xhtml @23,61 fileUploadListener="#{Import_2G.save()}": Target Unreachable, identifier 'Import_2G' resolved to null
 
     
    