aspose file tools*
The moose likes JSP and the fly likes page content type Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "page content type" Watch "page content type" New topic
Author

page content type

vinay uppala
Greenhorn

Joined: Apr 29, 2008
Posts: 2
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

Joined: Dec 11, 2004
Posts: 13410

Why are you setting a contentType from within a JSP?
Are you streaming PDFs from them?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
vinay uppala
Greenhorn

Joined: Apr 29, 2008
Posts: 2
sorry that is not "images/pdf" it "is images/jpeg"
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12823
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: page content type