my dog learned polymorphism
The moose likes JSP and the fly likes Displaying pdfs from MS SQL Server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Displaying pdfs from MS SQL Server" Watch "Displaying pdfs from MS SQL Server" New topic
Author

Displaying pdfs from MS SQL Server

Srinivas
Greenhorn

Joined: Feb 01, 2002
Posts: 9
I want to display pdfs stored as an image datatype in MS Sql server on a webpage. I am doing this to hide the location of the pdf. Is there a way to do this.
thanks in advance
srinivas


Srinivas
Joe Pardi
Ranch Hand

Joined: Oct 03, 2001
Posts: 47
You need to open the response output stream and write the bytes to it. Also, make sure to set the content type ("application/pdf"), the content length, and also the content disposition.
response.addHeader("Content-Disposition", ";filename=mypdf.pdf");
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Displaying pdfs from MS SQL Server
 
Similar Threads
Best JDBC drivers?
Bulk data through JDBC
Application Hang when delete() method execute
Scrollable ResultSet
Urgent : JDBC Driver for MS SQL Server 7