public void actionGuardarFoto(){     
        String path = FacesContext.getCurrentInstance().getExternalContext().getRealPath("/resources/images");     
        String archivo = path + "nombreImagenEstatica.jpg";      
        try {           
   
                OutputStream outStream = new FileOutputStream(new File(archivo)); 
                InputStream inputStream = new FileInputStream(path+ "/temp/" + this.getImageTemp()); 
                byte[] buffer = new byte[6124];
                int bulk;
                while (true) {
                    bulk = inputStream.read(buffer);  
                    if (bulk < 0) { 
                        break;     
                    }                 
                    outStream.write(buffer, 0, bulk);    
                    outStream.flush();           
                }             
                outStream.close();  
                inputStream.close();        
                    
            actionFoto();       
        } catch (FileNotFoundException e) {
            e.printStackTrace();    
        } catch (IOException e) {
            e.printStackTrace();     
        } 
    }