• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic