Ver Mensaje Individual
  #2  
Antiguo 04-08-2006
joel20 joel20 is offline
Miembro
 
Registrado: abr 2006
Posts: 38
Reputación: 0
joel20 Va por buen camino
Este es el codigo que utilizo para subir el fichero al ftp, alguien ve algun error?

Código:
try {
ServletContext theAppliServletContext = (ServletContext) this.getExternalContext().getContext();
String realPath = "ftp:\\\\backup@user:password;
File file1 = new File(realPath + File.separatorChar + uploadedJustName);
 uploadedFile.write(file1);
         } catch (Exception err1) {
   error("No se puede subir el fichero " + uploadedJustName + ".vuelve a i    ntentarlo.");
              }
        } else {
              error("Sólo se puede subir un determinado tipo de " +
                      "fichero (imagenes): jpeg, pjpeg, gif, png, x-png.");

Última edición por dec fecha: 04-08-2006 a las 11:18:43.
Responder Con Cita