• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

proxy servlet for pdf byte serving

 
Christopher Au
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have the following situation. There is a pdf streaming servlet provided by a vendor which not accessible to the outside world as the data is sensitive. What we would like to is write a proxy servlet which can pass the pdf streams back to the browser, the reason for this proxy servlet is to do some authorization to ensure that the person who is logged does indeed have access to the PDFs. If anyone could offer some example code that would be greatly appreciated.

Thanks

Lasher
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34202
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have to pass the PDF stream? I think it is easier to get the whole PDF file and then open a new stream to the real client.
 
Christopher Au
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

would it not be faster if we were to take this approach, otherwise we will need to wait for the file to come through completely (this will be byte served to us) and then we will then need to byte serve the pdf to the browser.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34202
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Streaming is faster. If the file isn't very large, it wouldn't be noticeable though. I'm not sure how to do the real time streaming. Somewhat curious if it is possible now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic