Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/04/2007, 02:57
crnieto05
 
Fecha de Ingreso: abril-2007
Ubicación: España
Mensajes: 19
Antigüedad: 17 años, 1 mes
Puntos: 1
De acuerdo Re: itext guardar directamente en el servidor

Muchas gracias por la respuesta.
Efectivamente como ya tengo construido el ByteArrayOutputStream, solo he tenido que añadir las siguientes líneas:
// Para establecer la ruta donde deseo guardar el archivo
String path = getServletContext().getRealPath("/pdf/factura/"+faTmp.getNumeroFactura()+".pdf");
//Creo el archivo de salida con su ruta
FileOutputStream FOS = new FileOutputStream(path);
//Escribo el contenido en el archivo
baosPDF.writeTo(FOS);
//Cierro el archivo
FOS.close();

Saludos.