Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Entrambe le parti precedenti la revisione Revisione precedente | |||
gwtipstricks:idxtipstricks:doc_mapping_xml [2021/03/22 15:46] francesco.rosati |
gwtipstricks:idxtipstricks:doc_mapping_xml [2021/04/02 17:52] (versione attuale) francesco.rosati |
||
---|---|---|---|
Linea 119: | Linea 119: | ||
//4) SERVIZIO PER LA CREAZIONE DEL DOC AGGIORNATO: | //4) SERVIZIO PER LA CREAZIONE DEL DOC AGGIORNATO: | ||
String contentDisposition ="attachment"; | String contentDisposition ="attachment"; | ||
+ | |||
+ | //esempi di content type: | ||
+ | //.doc application/msword | ||
+ | //.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document | ||
+ | //.xls application/vnd.ms-excel | ||
+ | //.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | ||
+ | String contentType ="application/vnd.openxmlformats-officedocument.wordprocessingml.document"; | ||
+ | httpServletResponse.setContentType(contentType ); | ||
httpServletResponse.setHeader("Content-Disposition",contentDisposition+";filename=\""+gwBeanDocument.getName()+"\""); | httpServletResponse.setHeader("Content-Disposition",contentDisposition+";filename=\""+gwBeanDocument.getName()+"\""); | ||
ZipFile zipFile = new ZipFile(tempFile); | ZipFile zipFile = new ZipFile(tempFile); |