This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Not able to open new browser instance for opening a xls in Secure Mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Not able to open new browser instance for opening a xls in Secure Mode" Watch "Not able to open new browser instance for opening a xls in Secure Mode" New topic
Author

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

Srilakshmi Munukutla
Greenhorn

Joined: Dec 07, 2005
Posts: 2
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to open new browser instance for opening a xls in Secure Mode
 
Similar Threads
Problem with tomcat...please advise
A new Session in another browser window?
Forcing IE to open Excel on a web page with the excel toolbar
Opening xls file in html
Problem in Opening HTML Page in Internet Explorer from my Swing Application