Open attachment

Hi,
          I am using a servlet to open attachment in JavaMail. Part of the servlet
          I deal with attachment part is as following:
          if(disposition.equals(mbp.ATTACHMENT)) //mbp
          is MimeBodyPart object
          ServletOutputStream out =
          httpResponse.getOutputStream();
          InputStream is = mbp.getInputStream();
          filename = mbp.getFileName();
          try{
          ContentType ct = new
          ContentType(sct);
          httpResponse.setContentType(ct.getBaseType());
          catch (ParseException pe)
          pe.printStackTrace();
          httpResponse.setHeader("Content-Disposition", "attachment;
          filename="+filename);
          Read file content.........
          Here is the problem I am having now: In IE, when click on attachment
          link, an Open/Save as dialog will be poped up. If select Save As option,
          the default filename appeared in the Save as dialog box is my servlet
          name and the file type is .html, the content in this file is my current
          html page, instead of real attached file content. But it is ok to open
          the file, the content is attached file content.
          Any body has any good suggestions?
          Thanks.
          Meian
          

Hi Daniel
Assuming you still have PowerPoint installed on your system, drag the attached file out of the mail window onto the desktop. Select the file by clicking on it once in the Finder then select Get info from the File menu. Click the disclousure triangle to expand the Open with: section if it is not already showing. Use the pop up menu to choose PowerPoint, use the last 'Other...' option if PowerPoint is not listed and navigate to it through the standard browse dialogue box. (Select 'Enable ALL applications.' if necessary)
Click Add when you find PowerPoint.
This will relink this file to open with PowerPoint by default in the future.
To make all documents with the same extension (.pps) also open with PowerPoint by default, click the 'Change All...' button in the Get info window.
Cheers, Stephen.
Edit: Yeah, what Jeff said. (Note to self: Must be more concise...) lol

Similar Messages

  • HT5275 When I download an attachment, it doesn't open in a new window.  It goes to my finder, but I must click on an email attachment at least 3 times in order to find it there.  Is there a way to change the preferences to simply open attachment in a new

    When I download an attachment, it doesn't open in a new window.  It goes to my finder, but I must click on an email attachment at least 3 times in order to find it there.  Is there a way to change the preferences to simply open attachment in a new window?

    http://www.apple.com/feedback/kaywerty wrote:
    A rather long winded way of asking if anybody knows if it's possible to have multi-windows open
    It's not possible.
    Suggestions here -> Apple Product feedback

  • Open Attachment option in Mail opens incorrect invite in Calendar

    My issue: if I double click or use the Open Attachment option in Mail for calendar invites, an invite from 2 years ago opens in Calendar for me to accept. If I use the Add to Calendar function, no problem & reads like it should do.
    I upgraded to ML about 2-3 weeks ago and Mail was spectacularly painful with the merge from SL not working at all. Calendar seemed to be ok, however this usse has started to appear in the last 24 hours.
    Ivites can be accepted no dram using the iPad or my wifes iPhone just seesm to beon the Mac that its a problem.
    Any thoughts/ideas/fixes would be great.
    Cheers.

    This link solved the problem
    https://discussions.apple.com/thread/4165985?start=15&tstart=0

  • My Safari quits unexpectedly while trying to open attached files or download?

    I had that problems once. My friend reinstalled My IMac for me. It worked. But now it is happening again. Safari quits unexpectedly while I am trying to open attached files or download anything. I hate that. I want that to never happen again. And I don't actually know how to reinstall the system. I am afraid of doing smthing wrong. So I have to call apple or my friend. What  is the easiest way and solution for that? What is the reason for this problem?
    Thank you.

    Try the following:
    1. Shutdown the computer and then start it up again, see if Safari repeats the problem.
    2. Consider the source file, if it is just one or the same ones all the time but other open, the files are the problem and not Safari.
    3. Run a permissions repair on the mac. Do this via Applications > Utilities > Disk Utility and select the hard drive (Second Icon with the Hard Drive Name, not the one showing the drive size above it) in the left pane and in the bottom middle click on permissions repair, don'yt worry you won't break the computer.

  • Error Message when opening attached doc  with Mac for Word 2008

    When I try to open attached docs of any any sorts (mainly word/pdf) I get an error message that wont allow me to open the attachments, please help!!
    I have MB Pro with Mountain Lion

    There are some things I can open but word docs and pdf docks I cannot open, here's the error

  • I can no longer open excel documents in my doc to go app. Error message simple reads can not open attachment. And the attachment is now a winmail.dat

    I can no longer open excel documents in my doc to go app. Error message simple reads can not open attachment. And the attachment is now a winmail.dat

    winmail.dat files usually mean the email has been sent in rich text format - you could either the person who sent it to send it in a different format e.g. plain text or HTML, or there are a few apps in the store that support it (search for winmail.date in the store).
    winmail.dat files : http://support.apple.com/kb/TS1506

  • Thunderbird cannot open attachment after idle for several hours on Windows Terminal Server 2008 R2 Enterprise

    We are using Thunderbird on WTS2008 R1
    Cannot open attachment after thunderbird is launched for a short period of time. Tried to save attachment but the attachment saved actually comes with 0kb. Thunderbird works fine after restart itself, not sure if any settings can fix this?

    Hi Darrkon,
    I suggest checking the status of the HealthMailbox on each of servers.
    Also try to re-create the mailbox. You can safely delete and recreate health mailboxes.
    Be aware that any local Managed Availability probes that are using the these mailboxes will fail until the Microsoft Exchange Health Manager is restarted.  Once that service is restarted, it will recreate any mailboxes that it needs. 
    More details in the following similar thread, just for your reference:
    BSOD after creating DAG
    http://social.technet.microsoft.com/Forums/exchange/en-US/44d1cd98-cba1-4ed0-b0e7-8aa76ee3eabc/bsod-after-creating-dag
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • Problem in Opening Attachment of Sharepoint 2010 list in new Window?

    Hi,
        I have a sharepoint 2010 list which contains attachments in list items. As per our requirement list should open in modal dialog. when users trying to open attachment from modal dialog its closing modal dialog and opening attachment in same
    window.
       Now the requirement is to open list item attachment in new window.
      I have tried with below script.
    function AttachTargetToAttachments()
     var anchors = document.getElementsByTagName("a"); 
    for (var i=0; i<anchors.length; i++) {
            var anchor = anchors[i];
            if (anchor.getAttribute("href"))
              anchor.target = "_blank";
    This is working when list item opening in separate browser(landing in different page). But when list item opened in modal popup its not working. 
    Please help.
    Thanks in advance.

    Hi,
    If this does not work in modal dialog, the workaround is to avoid to open the dispfrom.aspx page in
    modal dialog when clicking the Title field.
    You can open Allitems.aspx page using SharePoint Designer> locate the title filed <a onfocus=”onlink(this)
    …… onclick =”EditLink2(this,….)”>, remove the onclick =”EditLink2(this,{$viewcounter)}); return false;” from the tag. It will open the dispform page in normal when clicking the field.
    Xue-Mei Chang

  • Can't open attachment?

    Can't open attachment? Pdf word etc

    You need to review and download appropriate Apps from the App Store that can open the specific documents that you need to view. 
    Hope this helps

  • After loading Mavericks, I can't see/open attached pdf files

    after loading OS X Mavericks on my MacBook Pro, I can't see/open attached pdf files. I've checked my Security Preferences in Safari and Enable Java Script and Allow Plug-Ins are both selected. Any ideas as to what I need to do???

    I checked as you noted above - this is what comes up
    Adobe Acrobat NPAPI Plug-in, Version 10.1.7
    so I assume (?) that it is installed. 
    I just went into my hydro bill and tried to open the pdf version and, low and behold, it opened.  So somewhere in between when I reinstalled it yesterday (after your suggestion) and just now, it is working!!!
    So thank-you for your help!!.  Cheers.

  • RECIPIENT NOT ABLE TO OPEN ATTACHEMENT

    RECIPIENT NOT ABLE TO OPEN ATTACHEMENT! THE SERVICE HAS WORKED FINE FOR MONTHS NOW ALL OF A SUDDEN THE RECIPIENT CANT OPEN THE ATTACHNMENTS. THEY HAVE HAD THEIR TECH GUY LOOK AT IT AND HE IS UNABLE TO OPEN THEM EITHER. WHY IS THIS HAPPENING. WE ARE DOING EXACTLY THE SAME THING AT THIS END AS WE HAVE ALWAYS DONE. PLEASE HELP!!!
    I USE THE SERVICE AS OUR SUPPLIERS KEPT SAYING THAT THEY HADN'T RECEIVED OUR ORDER EMAILS AND WE DIDNT FIND OUT ABOUT IT UNTIL IT WAS TOO LATE. NOW WE CAN SEE THAT THEY HAVE BEEN OPENED AND PROCESSED. WE SEND A LARGE VOLUME OF EMAILS THROUGH THE SYSTEM AND NEED IT TO BE RELIABLE.
    PLEASE HELP!!!

    Hi Dburnglass,
    Please tell me a bit more--are you using Adobe Send (or Adobe SendNow) to send your files? How are your recipients trying to open the files (on an iPad, or laptop, for example)? Do your recipients get an error when they try to open the files?
    I look forward to hearing back from you.
    Best,
    Sara

  • VMM Shared ISO error "User account does not have permission required to open attachment"

    I had this error once because the local service account was selected during installation of VMM.  I have reinstalled VMM with a Domain service account and the error went away.  However, the error is back. 
    "User account does not have permission required to open attachment '\\[servername]\VMMLibrary\server.ISO'. Error: 'General access denied error' (0x80070005). (Virtual machine ID GUID)"
    I tried to create this VM on Host1 and got the error. 
    I then went to Host2 and was able to create the VM while using the same ISO on the same VMM library that failed on the Host1. 
    Both hosts have agent 3.2.7634.0 and are both running Hyper-V Server 2012 R2.
    What is wrong with Host1 and how do I correct it?
    Thank you.

    This is a share configuration permissions issue.
    http://technet.microsoft.com/en-us/library/ee340124.aspx
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

  • FB03 unable to open attachment list

    Hi SAP members
    I got the issue in which for FB03 unable to open attachment as it was maintained in the respective table.
    Goto FB03 > ENVIRONMENT > ADDITIONAL ASSIGNMENTS > OBJECT LINKS and a popup appears in which attachment is available but double click on it nothing happens
    Please let me know whether it is a functional issue or Technical Issue.
    Thanks in Advance
    Suresh

    Hi Pradeep,
    I am agreeing the Dev Patra's answer. Because it would be because of missing authorization roles also. Please execute SU53 after checking the above FB03 path.Then you will get the missing objects list to that t code.
    I hope it helps!
    Thanks & Regards,
    Lakshmi S

  • Windows live 1.00 (6141): can't open attached file...

    I updated latest firmware of My Nokia E71.
    After updating Windows live mail doesnt run properly.
    When I try to open attached files
    After  a few seconds , showing  message "retriving attacment" . gives this error " Failed to fetch this attacchment,Please resyncronise your inbox"
    Any solution??
    Thanks 
    Haldun AYDIN
    Turkiye
    Solved!
    Go to Solution.

    Go to phone book > place Windows LIVE> Options > About
    you will see:
    For support :
    http://support.live.com
    If you need my help or I late with an answer you need, send me a private message
    P.S.
    Please before doing that, be sure you have already searched the topict on this site about the issue you have. Read Help sections before asking. Describe yor issue step by step with complete details.

  • I can not open attached documents sent on my email, sent to me or when I send to someone else ? Why

    I can not open attached documents sent on my email, sent to me or when I send them to others, ? Why ?

    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (MAC)
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

Maybe you are looking for