Solved

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

Posted on 2010-08-16
5
1,267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 29

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 29

Expert Comment

by:chilternPC
ID: 33448998
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

710 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