• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

page content type

 
vinay uppala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

in my jsp I kept page content type as "application/pdf"

but inside the jsp I have used response.setContentType("images/pdf");

does this cause any problem??

I am able to get image in some browsers and not getting image in some browsers but I am unable to find what are the settings to be used so that the image has to be displayed.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you setting a contentType from within a JSP?
Are you streaming PDFs from them?
 
vinay uppala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry that is not "images/pdf" it "is images/jpeg"
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are really trying to return a content type of ANYTHING except html or text from a JSP you are in for lots of trouble.

Binary content such as images and pdf are best handled from a servlet.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic