Browser can't find a text file opened via the save as dialogue box

Hi there,
I have a servlet which outputs a file using the servlet output stream, with the following lines set:
response.setContentType("application/msword");
response.setHeader("Content-Disposition", "attachement; filename="+ fileName);
servletOutStream.write(myBytes);
servletOutStream.flush();
It works fine for .doc files and it seems the mechanism is that it is saved to the Temporary Internet Folder and delivered from there when the user clicks on the 'open' or 'save' option in the browser popup dialogue box. However... when I try this with text files, (setting the content type to "text/plain") I get the open/save dialogue box up correctly but if I try to open the file it says it cannot find the file, and gives the path under the Temporary Interenet Folder. If I look in there the text file isn't present - though the .doc files are.
So... it looks as if the problem is that for some reason it doesn't save the text files correctly to the Temporary Internet Folder.
I can't deliver the text files inline as a solution as the filename is lost and it thinks it's an html file (which the client doesn't want).
Any ideas?
Alison

At least also set the content length. Your browser may be configured be the default application to open textfiles. If the contentlength is not set, then most applications would refuse to open the file without choosing for 'Save' first and manually open it.

Similar Messages

  • How to create PDF file from bypassing the Save as Dialogue box in Adobe XI

    I am from powerbuilder development team. I want to save the output of the datawindow to PDF file using Adobe PDF printer but should not as for saving the file. The program should save the file to location mentioned in the registry key.
    I want to know which Adobe XI registy key I need to update to mention the file name and the location.

    You need to post this question to the Acrobat SDK Forum:  Acrobat SDK

  • Can we customize the Save As dialogue box in Acrobat DC?

    I was wondering if there is already a way we can customize the new DC Save As dialogue box.
    I would love to be able to open directly to "Choose a Different Folder" without going through this extra dialogue box (I understand the appeal of it, but it's not optimal for my workflow). Or perhaps, if I could customize the options under "Storage" (e.g. adding our own database folders "Posters", "Documents", etc, or maybe just pulling the "Favorites" folders from Windows explorer)
    I get the decision to have document cloud and creative cloud as default options. That's great for sharing and collaborating on documents, but I'm just managing too many documents and too large of a database. In my situation it's just, well, sub-optimal.
    I'm on Windows 7 running Adobe CC Group.

    OMG, I've been having this same exact thought since the first time I went to do a Save As ever since upgrading to Acrobat DC.
    (Mac OS X Yosemite here.)
    I find it so ridiculous to have to go through this extra step with every single "Save As."
    Example:
    1. Open our job ticket template PDF (for billing a project), which is in a "Company Templates" folder on my computer.
    2. Fill in the details/time for that project.
    3. Select "Save As" to save the job ticket to my project folder (different location).
    4. Have to click "Save to a different folder" every single time.
    "Save As" is nearly always going to be for saving a new version of a file to a different location, so I don't understand why there is now this extra step. It's just unnecessary IMO.
    So, to quote Will Riker: "Yes. Absolutely. I do indeed concur... wholeheartedly!"

  • How do I force Firefox (6v02) to stop showing thumbnails of existing file(s) in the save-as dialog box?

    I save files associated with similar objects using similar names (just a different extension, or numeric sequence). The save-as dialog box shows a list of existing files. When I choose one, with the intention of changing the file extension or the numeric sequence (e.g., choose 'file001.jpg' in order to rename the new file to be saved 'file002.mpg') the thumbnail associated with the one I select is shown on the right. I neither want nor need this time-consuming & memory-consuming process to take place. I would like to be able to disable this feature in order to allow me to do what I want directly and faster (P3/866MHz/512MB).

    Perhaps, but the problem is I don't really know what to look for. I've tried doing a keyword search of the AIprefs file to find where ICC profiles and compression could be located but I couldn't find anything. Does anyone know what they are called and what I should modify?

  • Where can i find my text files?

    I am working in a xaml app and am trying to make a text file, and then open it in like note pad. My code does not give me any errors but I can't find the file any where. Here is what I have:
            async void test()
                StorageFolder folder = Windows.Storage.ApplicationData.Current.LocalFolder;
                StorageFile sampleFile = await folder.CreateFileAsync("sample.txt", CreationCollisionOption.ReplaceExisting);
                await Windows.Storage.FileIO.WriteTextAsync(sampleFile, "Swift as a shadow");
    I don't know if I can't find it or it is just not being made. 
    Thank You for your time.

    Hi TomatoMan,
    A better way to find where the StorageFile points is to examine its Path in the debugger after calling CreateFileAsync. The path Anne mentions is common, but it is not correct for all systems.
    It should exist for your original app so long as the app hasn't been removed. This isn't the appx package itself, this is the application data. The app package will be in the Package.InstalledLocation and is not writeable (in production- it may
    be for a test app running from the VS project directory).
    The app data location shouldn't be exposed to users, but is only available through the app. If you want the user to be able to find the document outside of the app then you should use a FileSavePicker to let the user choose where to save it.
    If you want to programmatically open the file you can call
    Launcher.LaunchFileAsync with the sampleFile StorageFile object.
    --Rob

  • When I try to save on some websites I will try to save a pdf or mp3 file. Down below it will list the file and in the 'save as type' box it will not list as save as '.pdf or .mp3' but instead always says 'all files' which will not save it in a way it can

    Why won't the 'save as type' section list .pdf or MP3 to save a PDF or MP3 file but instead always says 'save as type' -- 'all files "."'. How can I get rid of the 'all files'.?

    Sorry, I have no idea what you are doing; can you give us some details?

  • How can i find an excel file deleted from the server

    In our office we all have access to the main server. Recently a document that we need was deleted from the server. It's not in the trash. Can and how would we be able to find and recover this deleted document? Specifically I am looking for an excel document, and I already checked the recent docs on excel.
    thanks!

    Have the admin for the server restore the file from the backup

  • After a recent update, everytime I open Firefox, the Add-ons dialogue box opens on top of the home page. How can I stop it from opening each time?

    The question contains all the information I can provide

    Ok I found a solution that worked for me, I simply dragged the user.js and the user.js.BAK to the desktop, before that I had done the same with the prefs.js and prefs.js.BAK, but that didn't help, so it's apparently the user file that was an error with.
    It was the link from cor-el that helped me on the way http://kb.mozillazine.org/Preferences_not_saved It's at the bottom titled User.js file locks certain preferences. This article can also help https://support.mozilla.com/en-US/kb/Preferences%20are%20not%20saved
    It have still not made a new user.js file, but everything runs fine, hope this can help others to.

  • The cursor no longer blinks in the Save As dialogue box, so how can I toggle the setting for it?

    I have been unable to make the cursor blink again through tinkering with the settings of about:config
    == This happened ==
    Every time Firefox opened
    == In late June

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Can't find my stored files -

    I have an iPhoto Library on my Main computer;
    I have another iPhoto Library on an exterior drive. Although it only shows up when I search Spotlight, this external drive has the Library.iPhoto file along with a Library6.iPhoto file. and... It appears to mirror my desktop iPhoto Library that stored on the main computer exactly as I use my desktop iPhoto application. ??
    ? I can't open any folder to view the original stored files (not that I care to change them). But I used to be able to see these stored pictures in their folders?
    ? This mirroring would seem to be a great backup solution but I can't find any discussions and am now thinking there is a problem that should be fixed?
    I don't get it.
    Thanks for any ideas...

    Your files are stored in the iPhoto Library. By default this is in your Pictures Folder. With iPhoto 7 (iLife 08) the old iPhoto Library Folder is now a Unix Style Package File. The change was made to the format of the iPhoto library because many users were inadvertently corrupting their library by browsing through it with other software or making changes in it themselves.
    The Library.iPhoto file and the library6.iphoto files are elements within the Library. They are databases and contain no photos themselves.
    Iphoto has no facility to mirror itself, so I’m not sure what’s on that other drive, unless you have run some back up utility on it.
    Some FYI:
    There are many, many ways to access your files in iPhoto:
    *For Users of 10.5 Only*
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Apple-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    You can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    *For users of 10.4 and 10.5* ...
    Many internet sites such as Flickr and SmugMug have plug-ins for accessing the iPhoto Library. If the site you want to use doesn’t then some, one or any of these will also work:
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. However, if you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    *If you want to access the files with iPhoto not running*:
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.
    Regards
    TD

  • Can't find CSS resource file

    I am using Windows XP with Netbeans 6.9 M1.
    I am using JSF 2.0 and maven 2.2 and Glassfish V3.
    In my index.xhtml, I am using: <h:outputStylesheet name="resources/css/styles.css" />
    although I have tried library="css" and name="styles.css"
    When I created a stylesheet, I put it in the following
    directory:
    c:\MyWebApps\MyProj\src\main\resources\css\styles.css
    After doing a build, it was in the following directories:
    c:\MyWebApps\MyProj\target\classes\css\styles.css
    c:\MyWebApps\MyProj\target\MyProj\WEB-INF\classes\css\styles.css
    In MyProj.war (using WinZip)
    \WEB-INF\classes\css\styles.css
    I used the Admin Console to deploy and launch.
    When I launched MyProj, the web page was displayed but
    there was no CSS styling.
    When I view page source, I see:
    <link type="text/css" rel="stylesheet" href="RES_NOT_FOUND" />
    I found the following in the server log
    INFO: MyProj was successfully deployed in 5,266 milliseconds.
    WARNING: JSF1064: Unable to find or serve resource, styles.css, from library, /WEB-INF/classes/css.
    WARNING: JSF1064: Unable to find or serve resource, resources/css/styles.css.
    WARNING: JSF1064: Unable to find or serve resource, css/styles.css.
    What am I missing?????

    Yes, he does show having a resource directory in the same place I do. However, he does not mention how to implement css files within the resource directory. I have used h:outputStylesheet to position them in the .war file but it appears the browser can not find them.

  • Had to uninstall iWork trial since I bought the pages app and it wouldn't let me print or save.  Now the app store says I have pages installed but I can't find it anywhere to open and use it.  I'm not very computer savvy and am getting frustrated!

    Ooops, guess I didn't need to post everything in the title - sorry!  I bought the pages app - but couldn't save or print so with some online searching found that I had to uninstall the iWork trial which had expired.  I did that - but now I can't figure out how to re-install the pages app!!  The app store says it's installed, but I can't find it anywhere to open and use it.  I'm not very computer savvy - and am a first time Mac user and am getting extremely frustrated!  I e-mailed some help center and they can't seem to help me either.  I would appreciate any help/advice that can fix my problem - thanks in advance!!

    OK Apple has stuffed up the demo version upgrade process so the first thing you need to do is get rid of the demo.
    That includes getting rid of the files in the system.
    The instructions how to do that are here:
    Note That where you see / that is the sequence of folders, each nested inside each other.
    User/Library/Preferences the com.apple.iwork.Keynote.plist
    Means the User (you, the little home icon, whatever you are called on your computer) then the Library folder inside that and then the Preferences folder inside that.
    Lion initially hides the System folders from you so you have to go to the Finder > Menu > hold down the option key and click on GO > Library to see it.
    Peter

  • Can't find my data file to back up, so I can uninstall and reinstall the software. (Windows, Vista & Palm version 6.0.1)

    I can't find my data file, in order to back it up.  After going to Documents - Palm One, the only thing that looks like a user name is a file with no data.  Somewhere there has to be another file with all my data, since data is available when I open the Palm One software on my computer.  After backing it up, I want to uninstall and reinstall the Palm One software.  I'm hoping this resolves my inabilty hot sync.  Thanks!  Lauraflavin.
    Post relates to: Tungsten T5

    If you're using XP, your data is here:
    C:\Program Files\Palm (or PalmOne)\ your Hotsync Name abbreviated \
    WyreNut
    I am a Volunteer here, not employed by HP.
    You too can become an HP Expert! Details HERE!
    If my post has helped you, click the Kudos Thumbs up!
    If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you asked!

  • How can i read the text files and buffer the data in Vector?

    hi. I have been running into this problem for days, but with no luck and losing right direction.
    The problem is : I am trying to read a text file and buffer the data into a
    Queue for each user.
    the sample text file is as below:( 1st column is timestamp, 2nd is user_id, 3rd is packet_id, 4th is packet_seqno, 5th is packet_size)
    0 1 1 1 512
    1 2 1 2 512
    2 3 1 3 512
    3 4 1 4 512
    4 5 1 5 512
    5 6 1 6 512
    6 7 1 7 512
    7 8 1 8 512
    8 9 1 9 512
    9 10 1 10 512
    10 1 2 11 512
    11 2 2 12 512
    12 3 2 13 512
    13 4 2 14 512
    14 5 2 15 512
    15 6 2 16 512
    16 7 2 17 512
    17 8 2 18 512
    18 9 2 19 512
    19 10 2 20 512
    20 1 3 21 512
    21 2 3 22 512
    22 3 3 23 512
    23 4 3 24 512
    24 5 3 25 512
    25 6 3 26 512
    26 7 3 27 512
    27 8 3 28 512
    28 9 3 29 512
    29 10 3 30 512
    30 1 4 31 512
    31 2 4 32 512
    32 3 4 33 512
    33 4 4 34 512
    34 5 4 35 512
    35 6 4 36 512
    36 7 4 37 512
    37 8 4 38 512
    38 9 4 39 512
    39 10 4 40 512
    40 1 5 41 512
    41 2 5 42 512
    42 3 5 43 512
    43 4 5 44 512
    44 5 5 45 512
    45 6 5 46 512
    46 7 5 47 512
    47 8 5 48 512
    48 9 5 49 512
    49 10 5 50 512
    50 1 6 51 512
    51 2 6 52 512
    52 3 6 53 512
    53 4 6 54 512
    54 5 6 55 512
    55 6 6 56 512
    56 7 6 57 512
    57 8 6 58 512
    58 9 6 59 512
    59 10 6 60 512
    60 1 7 61 512
    61 2 7 62 512
    62 3 7 63 512
    63 4 7 64 512
    64 5 7 65 512
    65 6 7 66 512
    66 7 7 67 512
    67 8 7 68 512
    68 9 7 69 512
    69 10 7 70 512
    70 1 8 71 512
    71 2 8 72 512
    What I wanna do is to read all the data above and buffer them in a queue for each user( there are only 10 users in total).
    I already created a class called Class packet:
    public class packet {
        private int timestamp;
        private int user_id;
        private int packet_id;
        private int packet_seqno;
        private int packet_size;
        /** Creates a new instance of packet */
        public packet(int timestamp,int user_id, int packet_id,int packet_seqno, int packet_size)
            this.timestamp = timestamp;
            this.user_id=user_id;
            this.packet_id=packet_id;
            this.packet_seqno=packet_seqno;
            this.packet_size=packet_size;
    }then I wanna to create another Class called Class user which I can create a queue for each user (10 users in total) to store type packet information. the queue for each user will be in the order by timestamp.
    any idea and sample code will be appreciated.

    Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
    Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave.

  • I Just converted my iPhoto library to Photos. Now I can't find my RAW files. I need to have all the images in my old library show up in their RAW format.

    I Just converted my iPhoto library to Photos. Now I can't find my RAW files. I need to have all the images in my old library show up in their RAW format.

    Unfortunately no - Photos use extensions and the vendor (adobe) will have to implement the extension to allow external edits in PS or PSE
    For now you must export the photo, edit and then import - not great but a work arond
    And you can continue to use iPhoto until Photos meets your needs - launch it in your applications folder - if you need assistance on this see Why won't my iPhotos open?
    LN

Maybe you are looking for