Solved

How to open a ".odt" file in browser instead of download it?

Posted on 2010-08-16
5
1,237 Views
Last Modified: 2013-11-23
Hello,

I'm trying to execute a jasper report that exports to odt (OpenOffice). The report is working fine, but when it opens, the browser asks if the user wants to open or to save the report. I want to open in the browser, like pdf. Is it possible?

I'm using this header:
resp.setHeader("Content-Disposition"," inline; filename=Report.odt");
                  //resp.setContentType("application/vnd.oasis.opendocument.text");
                  resp.setContentType("application/odt");
                  facadeReport.executeODT( out, reportCmd.getReport(),map );

Thanks...
0
Comment
Question by:arthur_info
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 33448717
You'd need to have a browser plugin for that - not sure if one exists
0
 
LVL 28

Expert Comment

by:chilternPC
ID: 33448731
if you download and install open office it will also install a plugin for the browser
see www.openoffice.org
0
 
LVL 11

Accepted Solution

by:
ICaldwell earned 500 total points
ID: 33448741
No, the open office does not have a reader interface like the Acrobat PDF reader, you will have to download the file to open it.....

The other solution would be to use an online viewer like this:  http://www.viewdocsonline.com/

Read the legal stuff before using this though....
0
 
LVL 1

Author Closing Comment

by:arthur_info
ID: 33448947
ok... Thanks...
0
 
LVL 28

Expert Comment

by:chilternPC
ID: 33448998
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java 1603 Error 3 50
JUnit 4 @Before and @BeforeClass differences 3 48
eclipse argument 14 53
expectj telnet failing 5 19
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now