Advertisement
Guest User

Untitled

a guest
Apr 18th, 2014
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. daoIntf=new DAOImpl();
  2. document = daoIntf.getEntity("Document", id);
  3. Blob docBlob=(Blob)document.getProperty("resume");
  4. String fileName=(String)document.getProperty("fileName");
  5. String contentType=(String)document.getProperty("contentType");
  6. response.setContentType(contentType);
  7. response.setHeader("Pragma" , "no-cache");
  8. response.setHeader("Cache-Control" , "no-cache");
  9. response.setDateHeader("Expires" , 0);
  10. response.setHeader("Content-Disposition" , "inline;filename=""+fileName+""");
  11. ServletOutputStream out = response.getOutputStream();
  12. out.write(docBlob.getBytes());
  13.  
  14. http://docs.google.com/viewer?url=<url_of_your_document>&embedded=<true|false>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement