• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ServletOutputStream on HTTPS connection

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
We have a servlet that streams a PDF file into the ServletOutputStream of the response object. We set the content type in the header to be application/pdf. There is nothing special in the logic and there is nothing else in the response object except this stream of binary file.
However, when the application is run using https connection the browser would always issue a warning message "This page contains both secure and non-secure items. Would you like to view the non-secure items?" Clicking Yes (or No!) actually displays the PDF.
But why is this? Does it mean that the binary stream is not encrypted automatically if using ServletOutputStream (thus making it a non-secure item in the page)? What do we need to do to ensure that the file we send through ServletOutputStream will be automatically encrypted when viewed in an https connection?
Please help.
Thanks
Eric
 
Eric Lim
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I forgot to mention in my previous post that the problem only occurs if the request is a result of a POST method. When streaming the PDF on a GET, the problem does not occur.
thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic