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.");