Open File Dialog appears TWICE when using servlet to download an attachment

Hi,
This is KILLING me!!! Please HELP.....
I am using a servlet to download an xml file, which I build on the fly based on user interaction.
The open file dialog appears nicely and I hit open. The dialog pops up again immediately and I have to click open again in order to open the file.
This works fine when file extension is txt and I DONOT have to click twice. Here is the code:
String xmlString = getXMLString(); //builds xml
String fileName = "myFile.xml";
response.setContentType("application/x-download");
response.setHeader("Content-disposition", "attachment;filename=" +fileName);
PrintWriter out = response.getWriter();
out.print(xmlString);
out.flush();
I am using IE6.0 sp2

http://forums.java.sun.com/thread.jspa?threadID=596940&tstart=20

Similar Messages

  • Open file dialog is slow when choosing desktop

    At first I thought this was only Safari but it does the same thing in Chrome, Keynote, Pages, Word, Excel, Powerpoint, Photoshop, Lightroom...etc.
    If I open any app and choose open, and then choose Desktop that app stops responding.   Some apps will be ~5-10 seconds, others can be 30 seconds to a minute.  During that time I get the spinning beachball and program becomes unresponsive.  
    I've removed any files off my desktop, I don't have any external drives hooked up to it.  It's become incredibly frustrating and this problem started happening after I installed Mountain Lion.
    Any help would be greatly appreciated.

    Open Finder, press Option key, select Go > Library, open Preferences and delete com.apple.desktop.plist

  • Open File dialogs often empty in Mavericks

    Since upgrading to Mavericks I've often had problems with the Open File dialog. Often when I select a folder in any Open File dialog in any application, no files show up. This is also true when for example I try and export a photo from iPhoto. The File dialog asking me to select the location to place the photo does not show the contents of existing folders. So once I select the computers hard drive, I can't select a folder or a folder inside a folder to place the photo.
    Eventually if I cancel the operation and keep trying, the Open File dialog will work.
    This is but one of the many slowdowns I'm experiencing with Mavericks. In general, this has not been a pleasant upgrade, and I have a MacBook pro which is only a year old. At times it seems as slow as a computer from the 1980s.

    Working workaround:
    Use the following statements in Terminal.
    sudo vi /etc/auto_master
    In this file comment out /net with #  (#/net .....)
    sudo automount -vc
    Fixed.

  • How can I change the default "file type" in the open file dialog when using Firefox on certain web pages?

    I work for a bankruptcy attorney. We use the Court's file upload to file our documents. When I am on the Court's site and I have to pick a file to upload, the "open file" dialog box pops up. In Firefox, the default "file type" is always "image" files. I need it to be "all files". How can I change this setting?

    Two observations.
    First — "Tools-> ...." is specific to Acrobat X and XI. It did not exist prior to Acrobat X.
    Second — Acrobat 9 Pro / Standard (nor earlier release) does not support viewing a PDF page containing a scanned image and performing a right-click  ... Save Image As. 
    The context menu provided by Acrobat 9 Pro with a right-click on a scanned image is:
    The context menu,from a right-click with the TouchUp Object tool selected, for Acrobat 9 Pro is:
    So, to paraphrase what Paul Harvey used to say ... What's the rest of the story?
    Be well...

  • Open File dialog window when setting the value of a path type input argument in a VI call

    Hi,
    I am new to TestStand (running 4.0) and I want to create a sequence of VIs to turn on, setup and measure a device. One of my VIs sends a configuration file to my device. An input argument to this VI is the path of the config file. I would like to make it simple to modify this path when setting up the sequence by popping up the File Open dialog window and choose my file. Is this possible? I do not want to manually change the file during execution, just to have multiple calls of one VI, each call opening a different file according to the path given to it during the setup. 
    So far I have only succeeded in manually entering the absolute path each time I add this step. What makes it even more annoying is the fact that LabVIEW interprets the path with the escape codes, rendering the path unusable. Manually adding a 2nd backslash at each '\' occurence adds another step to the process. I tried both String and Path type of inputs, and the SearchandReplace() or ToUpper() (trying to bypass the escape codes) functions in TestStand don't seem to help m.
    Your help is very much appreciated,
    Fred

    Eudaemonic,
    If you want to create a series of easy to configure step types so others can develop sequence files easily, you could use custom step types. When you create a custom step type you implement your own configuration dialog. Since you have control over what controls you expose in your configuration dialog, you can design it so the desired path is selected using a open file dialog. Refer to chapter 13 of the TestStand reference manual for more information about custom step types.
    If you do not want to create a custom step type but you still want to give access to your sequence developers to pre-configured steps, you can use templates. A step template is a snapshot of a step that you can reuse later. Let's assume that instead of asking your users to edit the step to enter the desired path, you create several step templates with different pre-configured paths and based on their applications requirements they could use the appropriate template. Refer to the NI TestStand Help for more information about the Templates list on the Insertion Palette.  
    Hope it helps.
    Antonio Lie. 

  • Folder appears in Windows Explorer, but not in the Open File dialog

    Hello,
    I hope this is the right place to post this. If not, please let me know where is.
    A friend just showed me a weird problem he is having with his computer. He is using Windows 7 pro, and has a folder under My Documents, in which he keeps his work files. He emails these files using Gmail, which he accesses via Internet Explorer.
    All worked fine until a few days ago, when he noticed that when he clicked the link in Gmail to attach a file, his folder wasn't listed in the Open File dialog. He looked in Windows Explorer, and could see the folder OK. I tried opening Word and using the Open
    File dialog there, and the folder wasn't visible.
    If he clicks in the address bar, and adds the folder name to the path, it opens the folder, but shows it as empty. I actually has two subfolders. If he adds the name of a subfolder, then the Open File dialog shows the files in that folder.
    I checked the permissions on the folder, and couldn't see anything odd. What I don't understand is how the folder can be visible in Windows Explorer, and not in the Open File dialog.
    Anyone any ideas? Thanks
    FREE custom controls for Lightswitch! A collection of useful controls for Lightswitch developers.
    Download from the Visual Studio Gallery.
    If you're really bored, you could read about my experiments with .NET and some of Microsoft's newer technologies at
    http://dotnetwhatnot.pixata.co.uk/

    I can confirm - I'm having the exact same problem.
    When I try to lookup or save a file from an IE file dialog some folders do not show up. I can type the folder name into the directory field and it then goes there, but this assumes you know the directory name and it's a PITB.
    Firefox can browse to the directory directly.
    It would be interesting if anyone else found a fix for this - I'll post here again if I find out more somewhere else, but there are not too many threads out there as far as I have found for now.
    Found a solution over at answers at Microsoft dot com. (can post links here yet - will update once I can)
    In short: There's a fast fix for this issue by resetting a hidden flag that IE sets for some folders. I believe this part of the "protected mode" feature, though I can't confirm and also have no idea how this would protect me from any intruders,
    if only (unimportant) subfolders are protected ...
    Anyway - if you know the name of the missing folder (e.g. from browsing the directories form windows explorer): in the parent directory that has the folder missing do a Search (in box at top right) for the missing
    folder name. In my case the hidden folder shows up in the search - now right click -> Properties -> clear hidden flag. Note: this "hidden" flag is independent of the flags set in windows explorer - that's why you have trouble going there with IE and not
    the file explorer from the desktop.

  • When I hit the escape key to close out the open file dialog box, firefox hangs or crashes.

    When I open the "open file" dialog box using the ctrl+O and then hit the escape key to exit the box, I get an error message which I'm not able to paste here.
    it says something about a runtime problem and if I try the same thing again to reproduce the problem, it will sometimes just hang and windows vista will tell me the program is not responding.
    I've checked to see if there are any crash IDs but none were found for this time frame.
    I have even disabled all add ons.
    I'm currently using vista 64 bit edition and Firefox 6, beta edition.

    Hi,
    Please also try right-clicking on the link corresponding to the language version and '''Save Target As''' to save the Firefox installer. If the problem persists, posting [http://answers.microsoft.com/ here] would also be helpful.
    [https://www.mozilla.org/en-US/firefox/all.html Firefox Latest]

  • Illustrator CS3 crashes in "Open file" dialog when making a copy of a file

    Hi!
    I have a user, who has quite a weird problem. We use the Design Standard CS3 package, since we can't afford to upgrade all 20 users to CS5 right now.
    The problem occurs in Illustrator, when she goes to the "Open File" dialog. She often makes copies of files in there (ctrl+c, ctrl+v), so she has a backup of the file she's currently working on. Why she won't use Explorer to do that, I can't say.. she said something about it being easier this way.
    The problem is, that often when she presses ctrl+v Illustrator crashes without warning. Usually when Illustrator crashes there's a warning about not enough memory, an error report or stuff like that, but none of that happens. It's fully patched (13.0.2), and there's no problem with the Print Spooler or the default printer.
    I'm unable to replicate it on my computer, unfortunately, so I'm turning to you. Have any of you ever heard about this, seen it somewhere - and do you know what causes it?
    Best regards,
    Thomas

    Sorry, forgot to add that she's running Windows XP SP3, fully updated, 32-bit on a HP Z400 Workstation.

  • My files in itunes appears twice when i scan for media, why?

    my files in itunes appears twice when i scan for media, why?

    Do you use iTunes Match?
    I presume you are referring to iTunes running on a computer.  iTunes does not run on a mobile device (it is confusing but it is a completely different sort of application and is the iTunes Store App, not iTunes).

  • I cannot open pdf files from one supplier when using Adobe Reader but I can using another Viewer

    I cannot open pdf files from one supplier when using Adobe Reader but I can open it if using Google PDF viewer or another viewer. The Adobe reader gives the error "There was an error opening this document. The file is damaged and could not be repaired" when I try to open the file. The version of Adobe Reader is 10.1.7, however I have tried other versions and they all fail the same way.  I have tested on a number of different PC's in different networks and all fail using Adobe Reader but work using alternate viewer. Also the PC's will open a PDF from any other source.

    Newer Reader versions are more strict than older versions (and other PDF viewers).  If certain minimum requirements are not met, Reader will tell you that the PDF is damaged.  This can happen when a document was created with software that does not adhere to PDF standards, or when the file was damaged during a download or email transmission.
    You should contact the creator of these PDFs.

  • Trying to create multithreading problems when opening file dialog

    Warning: Newbie to Labview...
    I have a problem in a rather complicated VI where bringing up the open file dialog halts some background operations.
    I would really like to reproduce this behaviour for various reasons, but am unable to. I've created a simple VI with a for-loop where the index feeds a sine converter which in turn feeds a tank indicator. This produces an oscillating behaviour. To this VI I've added a file dialog control.
    Regardless of the multithreading setup, I'm unable to get the oscillating of the tank indicator to stop when the dialog is open. Is there something I can do to get this behaviour? I realize it's unusual to try to break things, but it is rather important for me.
    Tha
    nk you,
    Nigel

    Hi,
    The for loop (all loops by the way) is halted until everything in it is
    finished.
    Try this:
    + Make a while loop
    + wire TRUE to the stop criterium.
    + Put an indicator on the 'I'.
    + Put a MS Wait in it (e.g. 80 ms), to prevent 100% processor time.
    Run it, and the indicator will increase fast.
    Now put any dialog in the while loop. E.g. a message box.
    The indicator will increase everytime you press 'OK'.
    Note: stop by pressing CTRL+. and clicking 'OK' several times.
    Regards,
    Wiebe.
    "N Cook" wrote in message
    news:[email protected]..
    > Warning: Newbie to Labview...
    >
    > I have a problem in a rather complicated VI where bringing up the open
    > file dialog halts some background operations.
    >
    > I would real
    ly like to reproduce this behaviour for various reasons,
    > but am unable to. I've created a simple VI with a for-loop where the
    > index feeds a sine converter which in turn feeds a tank indicator.
    > This produces an oscillating behaviour. To this VI I've added a file
    > dialog control.
    >
    > Regardless of the multithreading setup, I'm unable to get the
    > oscillating of the tank indicator to stop when the dialog is open. Is
    > there something I can do to get this behaviour? I realize it's unusual
    > to try to break things, but it is rather important for me.
    >
    > Thank you,
    > Nigel

  • What does the open file dialog do 'under the hood' and is there a way to simulate it

    What does the open file dialog do 'under the hood' and is there a way to simulate it?
    I have a bug in my code (that I've posted about before, here) which I can't fix at the moment, but I do have a workaround.
    Briefly, the bug:
    I call a dll from a function node, to initialise and run a spectrometer. If I start up the PC, LabVIEW and run my vi the code runs without complaint, the first call to the dll to initialise the spectrometer doesn;t return an error but the spectrometer is not detected either.
    I've tried various solutions, see the link above, and none work
    The workaround:
    If, at any time before running the code containing the function node I open an 'open file' dialog window, select the dll and click ok/hit enter then everything is fine. When I run the main code the spectrometer is detected.
    I use an express vi to open the file dialog, I specify the start path and file name as constant inputs and just click ok/hit return when the dialog pops up. I don't do anything with the dialog outputs. In fact the vi that contains the open file dialog can be run before the project containing the bug is even open.
    I have to do this everytime I turn the PC on.
    So, either
    1) Can somewone suggest a fix for the original bug?
    2) What is the easiest way to simulate the enter keypress when the open file dialog pops up
    or
    3) Can someone tell me what the open file dialog does under the hood that somehow causes the dll to work and can it be simulated in straight LabVIEW
    I suspect that the dll itself is dodgy ( I have in the past talked to the supplier but not got very far, and I will try again but I would like a quick, temporary solution too). I'm guessing that the file dialog is making some kind of check on the file, and possibly registering its presence with the OS (winXP). I tried using the file/folder exists vi to see if checking the file like that worked but no luck.
    Any help greatly appreciated.
    Dave

    Hi David
    I am very conscious about thread hijacking but this sounded like my issue so I hope you dont mind me asking about your issue. I am hoping that you have a spectrometer from the same vendor as me and its not just me seeing an Error 1097 issue. My spectrometer is from a company called Stellarnet.
    So far I have unable to get it to work with other VIs. There is one condition where I can get it to work but its no good for me.
    Case 1
    I open the VI in a fresh labview environment with no other VIs in memory. The code runs with no issue.
    Case 2
    Labview is not opened. I double click the spectrometer VI in windows explorer.  The VI opens but it fails to run resulting in Error 1097. Personally, I dont see the difference between this and Case 1 above and yet it fails.
    Case 3
    If I already have other VI's in memory and try to load the spectrometer VI and run it fails with Error 1097. This case is the one that most important to me. I have a test executive that will load test VIs dynamically and I can't get this to work. Same problem Error 1097.
    I wanted to share what I have seen with you and to let you know that maybe somebody else has the same issue. I am convinced its the DLL but the vendor dis-agreed saying it was LabVIEW. I couldn't convince him otherwise.
    Thanks in advance
    David

  • Some qt only programs are crashing opening the "Open File" dialog

    Hello Archers,
    I'm having some trouble to find out what's crausing the crashes, so i can properly fill a bug report upstream.
    Here is the issue:
    * After an upgrade from glibc 2.13-5 to glibc 2.14-4, some qt-only apps are crashing when i open the "Open File" dialog. This only happens when using specific KDE 4.6.4 or KDE 4.6.5 styles, like Oxygen and QtCurve.
    * Before i upgrade KDE from 4.6.4 to 4.6.5, i downgraded glibc and its dependencies to glibc 2.13-5 and the bug was gone. After upgrading KDE to 4.6.5, i didn't try the downgrade again because KDE 4.6.5 requires glibc 2.14 and the process of downgrading become unsustainable.
    * I tried removing the crashing apps data from my home directory and the crash still exists. I also tried to create a new user and start the apps from that new environment and the apps crashes, so the bug is not user-specific.
    * I tried replacing the binary nvidia driver with xf86-video-nouveau but the issue persists.
    * The apps crashing (and not applying the kde theme) are the following:
    => opera 11.50
    When opening the "Open File" dialog, it crashes with the following message:
    ------------- begin ---------------------------------
    $ opera --sync
    (operapluginwrapper:2349): Gdk-WARNING **: GdkWindow 0x7400034 unexpectedly destroyed
    (operapluginwrapper:2349): Gdk-WARNING **: GdkWindow 0x7400033 unexpectedly destroyed
    (operapluginwrapper:2349): Gdk-WARNING **: GdkWindow 0x7400032 unexpectedly destroyed
    (operapluginwrapper:2349): Gdk-WARNING **: GdkWindow 0x740001c unexpectedly destroyed
    The program 'operapluginwrapper' received an X Window System error.
    This probably reflects a bug in the program.
    The error was 'BadWindow (invalid Window parameter)'.
      (Details: serial 547 error_code 3 request_code 18 minor_code 0)
      (Note to programmers: normally, X errors are reported asynchronously;
       that is, you will receive the error a while after causing it.
       To debug your program, run it with the --sync command line
       option to change this behavior. You can then get a meaningful
       backtrace from your debugger if you break on the gdk_x_error() function.)
    ------------- end ---------------------------------
    => vlc 1.1.10
    When opening the "Open Directory" dialog, it crashes with the following message:
    ------------- begin ---------------------------------
    $ vlc
    VLC media player 1.1.10 The Luggage (revision exported)
    Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
    Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
    [0x9884a7c] main interface error: no suitable interface module
    [0x97e28fc] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    Blocked: call to setlocale(6, "")
    Blocked: call to setlocale(6, "")
    Segmentation fault
    ------------- end ---------------------------------
    * Using other qt-only apps, like qmmp or UMPlayer the bug doesn't occur.
    So, what do you thing of this? Am i the only one with this issue? I already reported the bug report on https://bugs.archlinux.org/task/24991 and https://bugs.opera.com/wizard/, but since i latter found out that this is not opera specific, i don't know where to fill the report. 
    Thanks in advance.
    Last edited by eldarion (2011-07-09 15:15:13)

    kachelaqa wrote:
    eldarion wrote:kachelaqa, can you please confirm if it happens with vlc or opera too? Thanks for helping.
    i had to install vlc and opera to test - but i'm afraid i don't get the errors you are seeing.
    so far, qt designer is the only application i've found that crashes when opening file dialogs.
    Ok, thanks for helping.

  • How to displays the standard open file dialog box in Oracle Apps Server

    Hi,
    I am having a form, where i am opening a file and putting that file content in a text box.
    This is my code written in WHEN-BUTTON-PRESSED trigger:
    declare
    in_file Text_IO.File_Type;
    linebuf VARCHAR2(8000);
    filename VARCHAR2(30);
    BEGIN
    filename:=GET_FILE_NAME('d:\Rajesh\Practice', File_Filter=>'Text Files (*.txt)|*.txt|',select_file=>false);
    in_file := Text_IO.Fopen(filename, 'r');
    LOOP
    Text_IO.Get_Line(in_file, linebuf);
    :text_item5:=substr(:text_item5||linebuf||chr(10),1,5000);
    END LOOP;
    EXCEPTION
    WHEN no_data_found THEN
    Text_IO.Put_Line('Closing the file...');
    Text_IO.Fclose(in_file);
    END;
    I have posted this in ORacle Apps Server.Where i was not able to get the Open Dialoq Box.It is giving an error as
    "FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-302000.".
    I think the GET_FILE_NAME function is not supported in the Apps Server.
    Is there any alternative solution for getting the OPEN DIALOG WINDOW in Oracle Apps Server?
    Pls let me know.

    Hi!
    waldemar.hersacher wrote:
    "It seems that the VIs called by the clients are running in the user interface thread.
    A call to the file dialog box will call a modal system dialog. So LV can't go on executing VIs in the user interface thread."
    Are you sure? I think, that File Dialog, called by LabVIEW File Dialog from Advanced File Functions Palette doesn't blocking any cycles in subVI, which running in UI Thread. Look in my old example (that was prepared for other topic, but may be good for this topic too).
    2 linus:
    I think, you must a little bit reorganize you application for to do this. You must put your File Dialog into separated cycle. This cycle, of course, will be blocked when File Dialog appear on the screen. But other cy
    cle, which responsible for visualization will run continuosly at the same time...
    Attachments:
    no_block_with_file_open_dialog.zip ‏42 KB

  • Open file dialog search does not show the correct files

    When i use "open file" in the menu of, for example Pages, and then type a word of my desired file name into the search dialog it does not always find the file. Searching in Finder works. And the file is where it is supposed to be.
    Does it use different kind of searches? I have "reindexed" spotlight but no avail.
    Of course i can look for the file manually and then start pages by double clicking the file...
    Any ideas?
    thanks wolf

    I'm not sure how Pages treats this, but it's possible that from an Open File dialog it may only search either the current directory or the default documents folder. Not sure about this as I'm not a Pages' user.

Maybe you are looking for

  • Newbie help please:  "Validation of XML file failed."

    Hopefully my question is short and easy. I'm a developer and haven't used FrameMaker before. However for unforeseen reasons, I've inherited our technical help documentation constructed in FrameMaker which I've never used. Unfortunately I'm under a ve

  • Itunes crashing

    Hello i have an iphone. Each time i want to import movies in mpeg4 to itunes library it crashes also when i try to sync movies, or tv shows that i have purchased from itunes store. i get an error from windows saying that itunes wasnt working and that

  • How to incorporate JAR file as package

    I need to use a class (JSObject) which exists in netscape.javascript used on the import statement. My class wont compile because of my code associated with the applet to javascript class. I found a JAR file which contains the netscape class, however

  • How do I get a pound sign on my key board?

    Hello I bought a mac book pro retina 2012 release date 12months old 2nd hand on ebay I cannot get a pound sign from the key board All the help on message boards says Alt/Option plus 3 should work.  Not for me it doesn't. I can't change it in system p

  • Function taking longer time to execute

    Hi, I have a scenario where i am using a TABLE FUNCTION in a join con condition with a Normal TABLE but its getting longer time to execute: The function is given below: CREATE OR REPLACE FUNCTION GET_ACCOUNT_TYPE( SUBNO VARCHAR2 DEFAULT NULL RETURN A