Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- daoIntf=new DAOImpl();
- document = daoIntf.getEntity("Document", id);
- Blob docBlob=(Blob)document.getProperty("resume");
- String fileName=(String)document.getProperty("fileName");
- String contentType=(String)document.getProperty("contentType");
- response.setContentType(contentType);
- response.setHeader("Pragma" , "no-cache");
- response.setHeader("Cache-Control" , "no-cache");
- response.setDateHeader("Expires" , 0);
- response.setHeader("Content-Disposition" , "inline;filename=""+fileName+""");
- ServletOutputStream out = response.getOutputStream();
- out.write(docBlob.getBytes());
- http://docs.google.com/viewer?url=<url_of_your_document>&embedded=<true|false>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement