How do I get the browser to allow Office programs to open files?

I have created a .JSP/servlet index of documents on a server. Basically, the JSP displays a list of all the documents in a directory with a summary of each and a link out to the right...like this:
<b>reference document<b> open
Word documents and PDF files open fine b/c they open in the new browser window, however, most other documents such as .XLS, .ZIP, and .PPT all return gibberish to the browser window. Obviously, I would prefer that the browser allow the associated program on the user's PC to open the file but I have no idea how to do that effectively...especially since I am dealing with a variety of filetypes??
Can someone tell me what the best way would be to manage this problem given that it could be any number of file types??
any help is greatly appreciated!
Thanks,
Chuck

I have gotten closer...I can get the application to open with the below code using response.setHeader() as follows but the file is not opened:
<%
String filename = request.getParameter("filename");
out.print(filename);
String format = ".PPT";
if ((format != null) && (format.equals(".PPT"))) {
response.setHeader("Content-Type","application/ms-powerpoint");
response.setHeader("Content-Disposition", "attachment;");
response.setHeader("Content-Disposition", "filename=".concat("test.ppt"));
%>
So, I am close...I was hoping someone could explain how to get the file to open in the application...right now all that happens is the app. opens but no content is diplayed.
Do I also have to do something like FileOutputStream with the file? can somebody possibly provide an example?
thanks again,
Chuck

Similar Messages

  • My Windows 7 gadgets are on top of the browser since I've upgraded to Firefox 4. How do I get the browser on top?

    My Windows 7 gadgets are on top of the browser since I've upgraded to Firefox 4. How do I get the browser on top?

    Glad to have helped.

  • How can I put the report generated by a program into a File?

    Hi all,
       How can I put the report generated by a program into a File?It can be in TXT format or excel format which ever is possible.
    I need to export this file to memory,How can I do that??
    Regards,
    Shashank.

    Hello Shashank,
    Please ignore my previous answer... Ofcourse it works...
    There are several ways to do this...
    two of them are
    1. List -> Save -> File and press enter..
        it will ask for the format, then path where to save it. Just give the path.
    2. Using function module 'GUI_DOWNLOAD'.
    I'm giving the example bellow which explains the usage of both GUI_UPLOAD and GUI_DOWNLOAD.
    To do this... you need to have folder with name 'TEST' and a .txt file in it with name 'test'. And contents of it are :
    TEST1             ,BOT 
    TEST2             ,BOT 
    TEST3             ,BUT 
    with spaces.
    REPORT zssr_bdc .
    DATA: BEGIN OF g_t_itab OCCURS 0,
            matnr LIKE mara-matnr,
            maktx LIKE makt-maktx,
          END OF g_t_itab.
    DATA: g_t_bdcdata TYPE TABLE OF bdcdata.
    DATA: path TYPE string,
          path1 type string.
    path = 'C:\Documents and Settings\ssr3kor\Desktop\TEST\test.txt'.
    path1 = 'C:\Documents and Settings\ssr3kor\Desktop\TEST\test1.txt'.
    *contents of test.txt    *
    *TEST1             ,BOT  *
    *TEST2             ,BOT  *
    *TEST3             ,BUT  *
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename = path
      TABLES
        data_tab                      = g_t_itab.
    LOOP AT g_t_itab.
      WRITE:/1(18) g_t_itab-matnr, 20(40) g_t_itab-maktx.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
       filename = path1
       filetype                      = 'ASC'
      TABLES
        data_tab                      = g_t_itab.
    Now you will get one .txt file with name 'TEST1.TXT' in the TEST folder.
    <b>REWARD POINTS IF IT IS HELPFUL</b>
    Regards
    Sasidhar Reddy Matli

  • I keep getting the same message when I try to open files on Internet.  Before viewing doc must agree

    I keep getting the same message when I try to open files on Internet.  Before viewing doc must agree to end license agreement & Quit & relauch browser. I've done this.over & over.  Now what?

    Test Screen Name wrote:
    When you launch Adobe Reader you should get the license agreement.
    - Do you get the license agreement?
    When you launch Adobe Reader you should NEVER get a message that it is already installed. That would mean you were trying to install it. NOT launch it.
    I agree.
    Installer:
    Application:
    If you're launching the first one... you're trying to reinstall it.

  • I tried to install inspiration browser to uninstall how do I get the browser

    I went to control panel to uninstall Inspiration Browser.  It did not appear in the list how to I get inspiration browser?

    Hi jaguar2420,
    Inspiration browser gave many problems, that's why Adobe dropped it in PSE11.
    I will recommend you to use tv.adobe.com, which has almost all the video tutorials you will find through inspiration browser.
    -Rahul

  • How do I get the browser windows at the top to come back

    how do i get thge browser windows at the top to come back

    How to get all the iWork apps, iPhoto, and iMovie for free on an eligible iPhone or iPad
    http://www.imore.com/how-get-all-iwork-apps-iphoto-and-imovie-free-eligible-ipho ne-or-ipad
     Cheers, Tom

  • How can I get the events from a java program?

    I want to make a monitor to watch a java program.How can I get the events from the GUI of this program some as mouse cliking, keyinput. So I can watch these in my monitor.
    Thanks

    Hi,
    To put a monitor to the events occuring in the GHUI u need to register required components with the appropriate EventListeners.
    Liek if u want to get notified when a mouse is clicked, then u need to add The MouseListener to the component which u want to be monitored.
    Say
    myFrame which is the JFrame object which shuld be monitored for the events.
    Then in ur program u have to add following code
    myFrame.addMouseListener( someObectReference );
    Here the someObjectReference should be an instance to a concrete class ..i.e. U write a class like the following
    public class MyMouseListener implements MouseListener {
    // override the followig methods
    public void mouseClicked(MouseEvent me){ sop("MOUSE CLICKED ON THE FRAME");}
    public void mousePressed(MouseEvent me){}
    public void mouseReleased(MouseEvent me){}
    If u dont want to use another class for listening to the events. Then u can make teh current class monitor the events. To do so ur class should implement the appropriate listener and should override the required methods.
    and u should say myFrame.addMouseListenet( this );
    thats it

  • When I have the downloads window open and I close the browser window, how can I get the browser to open the homepage the next time I start it while the download window is still open?

    When I have the downloads window open and I close the browser window, the next time I reopen the browser while the downloads are still going, it returns me to the last page I was on. All previous versions of Firefox would return me to my homepage which I would prefer. Please let me know if this is possible.

    When you re-open Firefox and choose Restore Session, by default it picks up your most-recently-open window, and the other windows should then show up in Recently Closed Windows.
    The Firefox add-on Session Manager lets you manage how many closed windows and closed tabs are saved, in case it's not enough.

  • How do i get the software to allow windows?

    I have a powerbook g4 and want to know where and how much is the software to allow me to run windows?

    Hi Kevin!
    These links will take you to different options for older machines as well as the new Intel Macs. Keep in mind that a PowerBook G4 is not an Intel machine. You'll be limited to Virtual PC.
    Microsoft Virtual PC - PowerMacs only
    Boot Camp - Intel Macs only
    Parallels - Intel Macs only
    Hope this helps! bill
    1 GHz Powerbook G4   Mac OS X (10.4.6)  

  • How do you get the browser to work offline. It stays connected even if you click on Work Offline option and there is a check mark beside it.

    I play an online game which requires me to open and set up several tabs, click on them offline, and then reload all tabs. With this new update, the work offline button does not work. I click on it 'Work Offline', a checkmark appears before the option. But when I click on the confirm button on the tab, it does not show the usual message that I am offline and I should try again after going online.
    I also do a lot of offline reading, which was possible with the previous Firefox versions. I'd load them while I was online, then I could read them when I was offline. Now I can't do this.
    I am not happy with this new version of FF. Is there a way to revert to the old Firefox?

    Does the Live Http Headers extension confirm that there is network traffic?
    *https://addons.mozilla.org/firefox/addon/live-http-headers/
    I notice that you are likely infected by Conduit software (malware) looking a the browser.newtab.url pref in the System Details list.
    Your System Details list shows that you have a user.js file in the profile folder to initialize prefs each time Firefox starts.
    The user.js file is only present if you or other software has created this file and normally it wouldn't be there.
    You can check its content with a plain text editor (right-click: Open with) if you didn't create this file yourself.
    The user.js file is read each time Firefox is started and initializes preferences to the value specified in this file, so preferences set via user.js can only be changed temporarily for the current session.
    *http://kb.mozillazine.org/Preferences_not_saved
    You can also check in "Windows Control Panel > Programs" for recently installed programs to see if anything from Conduit.
    *Control Panel > Programs > Programs and Features > Uninstall or change a program
    *Click the Installed column to sort by this heading

  • How to disable "Edit in browser" button in office documents that open in browser

    guys,
    Environment:
    sharepoint 2010
    installed Office Web app
    i installed office word apps and integrated it with sharepoint 2010 and all the office documents now open in the browser. but this also give the qualified users access to the button "Edit in Browser" while viewing the document in the browser (and if the user
    selects to do this and saves then it creates an office 2010 document in the document library), is there any way to disabled the "edit in browser" option completely for all the users, i dont want any users to edit documents online.
    thanks
    sameer.

    Ok so i came up with hack to 'hide' the edit link ..
    You need to edit the css file here on your server
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\INC\1033\WordViewer\WordViewer.css
    and add this 
     div [title="Edit in Browser"]{display:none};
    And to hide the edit capabilties for Powerpoint app - add this jquery
    $('iframe[id*="MSOPageViewerWebPart"]').ready(function () {
            $('iframe[id*="MSOPageViewerWebPart"]').contents().find('.ms-cui-ctl-medium').each(function () {
                if ($(this).text() == "Edit in Browser")
                    $(this).hide();
    Obviously not great solutions, but works for now.

  • How to change to PS CS6 is not default program to open files.

    I have PSCS4 and trial PSCS6. All my RAW and PSD files open by CS6 by default now. I want PS CS4 open PSD and RAW by default, as it used to, since CS6 is only trial.
    I have Mac Pro, OS X 10.7.4. (Lion)
    I tried to change it this way:
    File - Get info- Open with- change to CS4 - change all (use this application to open all documents like this one). It won't allow me, falls back to PS CS6.
    I can open files by right clicking and chose PSCS4, (indicated as Adobe Photoshop CS4.app (11.0.2(11.0.2x20100519 [20100519.r.592 2010/05/19:02:00:00:00 cutoff; r branch]))
    That arm long name for CS4 appeared after I installed CS6.
    Is there any way to do this on Mac? I cannot find anyplace file and program associations.
    Thanks for help,
    Rose

    Thank you, Dean,
    I tried the RCDefaultApp. It looks great and there is so much what can be changed, from the file extentions ends, program defaults and file types. I guess it works great. ... for other apps.
    But:
    Adobe PS CS6 keeps all files and extentions assigned and grayed out, unaccessible to change or uncheck.
    Therefore when extentions are assigned as default to anoter program or app, nothing happens. It won't allow to chose another program to open it under files tab too.
    It all falls back where it was before, same like with get info panel.
    PS CS6 is grabby program. PS CS4 Bridge now opens CS6 Photoshop, automatically, unless you tell it not to, chose right click CS4, which is pain in the neck, and will be even bigger after the trial expires. I may buy CS6, but not within a month. The period between is going to be troublesome, and making me not want to see CS6 at all, ever. I just hope after I uninstall it it will all fall back to CS4 defaults.
    Thabnks again for your reply.
    Rose

  • How do I get the directory name from my program?

    Hi,
    I want to indentify the directory name where my executable is running from the program.
    Is there any API similar to GetCurrentDirectory in Windows.
    Thanks,
    Ram

    I think you may be looking for the getcwd(3C) call.
    That call will get you the current working directory
    for your process. See the man page for details (man
    getcwd).
    Alan
    Sun Developer Technical Support
    http://www.sun.com/developers/support

  • How do I get the export value of a combox upon opening a document?

    I can't find a way to access the currently selected export value from a combobox upon opening a PDF document (without a keystroke event), so I'm using a very ugly trick (I have a function with a switch statement that returns a value that matches the export value, based on the current combo face value.
    Isn't there a way to retrieve the export value of a combo box upon opening a document?
    Thanks!
    Fred

    The following code segment is for the change event of a comboBox.
    Whenever a selection is made I want to populate a Form Field with the face value of the comboBox.
    This isn't working - and I can't determine why -
    it appears that I am not dereferencing the text properly - but this is my best effort based on my knowledge.
    Can anyone help with this ?
    Thanks
    var 
    combo1 = topmostSubform.Page1.DropDownList1.Text;
    var Deflt = 1;
    switch
    (combo1){
    case 
    "Education":
    CurrentValue1.rawValue
    = topmostSubform.Page1.DropDownList1.Text;
    break 
    case 
    "Demographics":
    CurrentValue1.rawValue
    = topmostSubform.Page1.DropDownList1.Text;
    break 
    case 
    "Licenses":
    CurrentValue1.rawValue
    = topmostSubform.Page1.DropDownList1.Text;
    break 
    case 
    "Certifications":
    CurrentValue1.rawValue
    = topmostSubform.Page1.DropDownList1.Text;
    break 
    case 
    "Business Information":
    CurrentValue1.rawValue
    = topmostSubform.Page1.DropDownList1.Text;
    break; 
    case
    "Disclosure Questions":
    CurrentValue1.rawValue
    = topmostSubform.Page1.DropDownList1.Text;
    break 
    default:
    Deflt = 0;}

  • How do i get the bluetooth to work om My 3GS?

    How do i get the bluetooth to work on My 3GS?

    File transfers over BT are not a feature of the iPhone. There are some apps in the App Store that will let you transfer photos from one iOS device to another. There may also be some that will allow music. Search the App Store and read the reviews before buying.
    For what it's worth, file transfer over BT is very slow.

Maybe you are looking for

  • Table numbers in a column to Right alignment

    Hi All, I have a table like the below. Age (Years) 1985 1998 2007 1–4 52 35 29 5–14 26 20 15 15–24 102 82 80 25–44 167 161 144 45–64 875 680 661 65–74 2,848 2,495 2,059 75–84 6,399 5,703 5,164 Over 85 15,224 15,111 12,947 I want to decimal align the

  • How TO DEPLOY JAR FILES INTO XI Server using SDM

    Hi XI Gurus,    im working on adapter development. we have created jar file in NWDS.    now going ahead to deploy into XI server through SDM.    can we deploy jar files directly into xiserver through SDM. or it needs to convert to any other formate l

  • Valid from and valid to properties under history preservation transform

    I have created_dt and last_updated both date columns in source table and also in target table. Now under history preservation transform for Date columns: For "Valid from" and "valid to" properties: which column should i pick? how can i use created_dt

  • IOS7 is a disaster

    Since upgrading my iPad is completely unstable.  Can I revert to IOS6?

  • Dowloading an XML file in Webdynpro without User Interaction

    Hi Experts, My Requirment is i need to download an XML file in  Cdrive Request folder. This should be done without any UI elements or User interaction. Download should be done in background. Are their any function modules or classes. Thanks, Sandy.