Solved

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

Posted on 2010-08-16
5
1,252 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 214
tomcat not starting 6 70
how to debug htl and js pages 8 39
Java syntax, or is it Selenium 6 30
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

820 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