Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Not able to open new browser instance for opening a xls in Secure Mode  RSS feed

 
Srilakshmi Munukutla
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to open a excel through the Java code in struts Framework.
The Piece of code I am using for this is:
response.setContentType(CONTENT_TYPE_XLS);
StringBuffer sbContentDisp = new StringBuffer();
sbContentDisp.append(CONTENT_DISPOSITION_INLINE_FILENAME);
sbContentDisp.append(FILE_PREFIX);
sbContentDisp.append(System.currentTimeMillis());
sbContentDisp.append(DOT);
sbContentDisp.append(sFileType);
response.setHeader(HEADER_CONTENT_DISPOSITION_TAG, sbContentDisp.toString());
response.flushBuffer();
ServletOutputStream sosStream = response.getOutputStream();
sosStream.write(tableData.getBytes());

I am using Internet Explorer for opening the new xls in new Browser of Internet Explorer. But when the page is opening in the new Browser, I am getting the Exception "The page cannot be opened" since the Checkbox in the browser properties "Do not save encrypted pages to disk". Hence this is not being downloaded. Can anyone tell me how to avoid this since I have seen internet webpages downloading though this is checked in my browser.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!