Try start Tomcat with strict compliance enabled. Add the following to your startup script. -Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=true When STRICT_SERVLET_COMPLIANCE is set to true, Tomcat will always send an HTTP Content-type header when responding to requests. This is significant as the behavior of web browsers is inconsistent in the absence of the Content-type header. Some browsers will attempt to determine the appropriate content-type by sniffing Regards Frank
> Am 10.12.2016 um 06:22 schrieb RAVIRAJ SHAH <[email protected]>: > > We develop jrxml file using jasper Studio and then use java code to > display that jrxml file which opens in new browser tab and by right click > on that file we are able to download this as pdf file in tomacat 8.0.14 > but some how in Tomcat 8.0.39 the same code doesn't works, it does not > allows files to download as pdf from browser. Instead it shows pdf file > type as all files and on downloading it shows failed network error. > > On Fri, Dec 9, 2016, 23:23 Christopher Schultz <[email protected]> > wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA256 >> >> Raviraj, >> >>> On 12/9/16 11:24 AM, RAVIRAJ SHAH wrote: >>> I am using jasper reports the library using jasper report >>> development studio >> >> No, you're not. The development studio is a GUI for building reports. >> >> - From the Tomcat perspective, you are just using JasperReports library. >> >>> I mean to say i can see pdf file on browser but when i try to save >>> that pdf >> >> So the PDF displays correctly in the browser? That sounds like it's >> working as expected. >> >>> i dont see file type as adobe acrobat file and saving pdf giving >>> error >> >> What does the "file type" show up as instead of PDF? >> >> When you "save" (how?) what error do you get? >> >>> I am generating pdf file on runtime i am not storing file >>> physically >> >> So are you streaming the file back to the client? That's not a feature >> of JasperReports, so you must have written a servlet wrapper that does >> this for you. What does the code look like? >> >>> One more thing same functionality working very fine with tomcat >>> 8.0.14 >> >> Understood. I suspect the problem is with your code; the Tomcat >> upgrade has merely revealed the problem. >> >> - -chris >> -----BEGIN PGP SIGNATURE----- >> Comment: GPGTools - http://gpgtools.org >> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ >> >> iQIcBAEBCAAGBQJYSu+wAAoJEBzwKT+lPKRYNRwP/ROxAziVyruW6byS19f0BrYD >> OX1DH2MFHarJo48bE42r+JwxNBqH/8FAzCyjamUj+xfD1iKXAwB1mA4lKaj0911D >> Rk4YbH2fIvDVQQ2EVR1SMViliYUMPmDe3PIiShvV+nt4rKMJMDwWavireCaHjQnP >> BkmbVTSJx3Ynyhb07EG6JexMELtWPHfjlxAKAzqfZntCJT1TYtABN6XWmRef82tz >> agaJfFyx/82kjLBROWQ/wpqRZL5gm6ZKQaWG1MPNTQx03CEE+UKDVPVMoVsYxnAx >> pe4w1R6eemCKsU+hRFmKKJxDzn+CJihENrfCRBV8bIqIXEtBTdbkPBnOUJ/V2x7U >> VhNoueuSNLAyWsd1uePdR5jhujxzF377rmr8+NId0DdUQmyq7c6xkByzywVhsPU+ >> pxJeSRoLu0fyL0U9XHD0OF3hVLXrTapRaAT1qGm8r74H4Y9BoqWvEPIiGUrST+Q+ >> ouJLnnHsPNcc6A52a88xbn73fMXLC+E2uHwest/tbxeUAGTXWIBsH6cmm1Si2wIj >> Q9JETiWLSGvuvPU16mPVnHb5t69IA9H+OCULFV/1RfT9f5XSGmtMwp6xmfzsHqkc >> lNHT4M0KoOkMeDuR09gps1FYulC8PqYbwsJ6gOsFt0dpnCOxWeosqhrPsf8N8fMr >> +mZGTdl1keV7n4DmG+ri >> =DHRG >> -----END PGP SIGNATURE----- >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
