Modifying the name of the file in the download dialog box

Hi all!
I've a javascript page that make a pdf document in the fly and download that document. Everything is fine, but I'd like to know how can I modifying the file name in the download dialog box, i.e., when the page display:
"You are downloading the file:
xpto.jsp from ..."
I want to substitute the "xpto.jsp" by "file.pdf".
I've already theses lines:
response.setContentType("Application/pdf");
response.setHeader("Content-Disposition", "attachment; filename="+ nameFile+";");
response.setHeader("Content-Length", ""+stp.length);
but the problem persist.
Note that in the second window, the Save As window, everything is fine, the nameFile appears in the file name box. The problem it's only in the first window, the File Download window.
Thanks for any help,
A. Santos

I've discover something. When the File Download window it's displayed with the following text:
"You are downloading the file:
xpto.jsp from localhost
Would you like to open the file or save it in your computer?
button OPEN button SAVE button CANCEL button MORE INFO"
if I press the OPEN button then another File Download window opens with the rigth text:
"You are downloading the file:
file.pdf from..."!!!
i.e, the text desired!
So the first window is unnecessary and undesired!
How can I remove this first File Download window??
Please help!
A. Santos

Similar Messages

  • How to create a record based on the name of a file in the file-system?

    Hi,
    With a lot of pictures I want to have a database to gather some information about these pictures.
    First question is how to generate a record based on a file in the file system?
    e.g. the pictures are "c:\fotos\2009\01\disc_001.jpg" to "c:\foto\2009\01\dis_98.jpg" .
    now i want to create records with as one of the attributes the name of the picture (not the picture itself). how to create these records (based on the information of the file-ssytem). i.e. the number of records should be the same as the number of pictures.
    any suggestions?
    any reaction will be appreciated.
    Leo

    Link to Create directory
    http://www.adp-gmbh.ch/ora/sql/create_directory.html
    You can create a list of files in the directory and read the list files from that directory.
    [UTL_FILE Documentation |http://download.oracle.com/docs/cd/B14117_01/appdev.101/b10802/u_file.htm#996728]
    [Solution using Java|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]
    SS

  • Why is the name of java file is same as public class?

    hello friends
    why we need to assign same name to .java file as the name of public class in .java file? while its not necessary for the class having no modifier?

    This question has been asked several times. Serch the forum.
    x

  • Change File Name In The "File Download" Dialog Box For Web Reports

    Hi All ,
    I followed the below note to change the "File Download" name.
    How To Change The File Name In The "File Download" Dialog Box For Web Reports? Doc ID: Note:418366.1
    However its not working. Has anyone tried this and works fine ?
    Basically I wanted to change the name "rwservlet" when a report is run in an
    excel format.
    Rajesh Alex
    Rajesh Alex

    Hello,
    Have you checked if a HTTP header "Content-disposition" is returned ?
    You can use ieHTTPHEaders for IE
    http://www.blunck.se/iehttpheaders/iehttpheaders.html
    and
    Live HTTP Headers for FireFox
    https://addons.mozilla.org/en-US/firefox/addon/3829
    Regards

  • Can we get the name of fmx file at runtime

    Hi all,
    can we get the name of fmx file which is doing some DML operation on a specific table Can we back track which fmx module has done DML on a specific table. The reason I need this because I've 7 different fmx files which are doing some DML operation on a specific table and these fmx files were used by different users. Not necessarily 1:1 For eg. one user can do DML through 3 different fmx files. So in such case if I want to want to know from which fmx file this DML has take place .How can I achieve that. I know I can get the oracle username through v$session but it will not suffice my needs. I need the name of fmx file also.
    I'm using:
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Any help?
    Warm Regards
    Percy

    Percy,
    For that you can set the Module Field in the V$session in each form by,
    DBMS_APPLICATION_INFO.SET_MODULE(MODULE_NAME => :SYSTEM.CURRENT_FORM, ACTION_NAME => USER);Write this in each form, and then you will get the form name in the V$SESSION's module field with form name.
    Hope this helps.
    Regards,
    Manu.

  • Change the name of a file.

    Hello, I don't how can I change the name of a file ?.
    Somebody can help me, please?
    For example : c:\out\prove1.csv to  c:\out\prove1_09112007_163001.csv
    Thanks

    Another way would be to use the FILE_COPY and
    FILE_DELETE of the class CL_GUI_FRONTEND_SERVICES to first copy the file and then delete the other one.
    REgards,
    Rich Heilman

  • BEx Brodcaster for Workbook - Cannot change the name of attachment file.

    Dear All Experts,
    I am using the BEx Broadcaster to distribute report of workbook via email. The name of attchament file in email is the technical of workbook. I want change the name of attchment file and found this thread
    [Broadcasting Workbook - Change attachment filename|Broadcasting Workbook - Change attachment filename] that reference to method in background process. Can I create customize program or method to change the name of file.
    Thank you and really appreciate your help.
    Zilla D.

    Hello Zilla,
    By SAP methods, this is not possible. There is no way to do that. May you can suggest it on our Community of Innovation. See note 11.
    This is not only your concern. Some customers already request this functionallity.
    Best Regards,
    Edward John

  • Downloading a pdf file, saving it, won't show the full name of the saving file when the name contains a space, stopping the file name.

    Downloading a pdf file, the name of the file contains a space in the middle of the file. The name showing on the 'Save' popup is the first few letters up to the space. Works fine on IE8. For instance, a file named "old snail_12345.pdf" would only show "old" (ignore the "s). This is on Firefox 30.0, WinXP Pro.

    Is this a problem when you are viewing the file in Firefox's built-in PDF Viewer and using its download button, or when you are using a download button in a web page?
    I've seen this problem occur when the server is pushing a different file name than the actual file name (for example, the file name is pdf.asp?id=12345 but the server is sending the name Annual Report.pdf in the headers sent with the file). I'm not aware of a workaround for the user, but for what it's worth, it is easy to fix on the server by replacing the spaces with %20 (the standard substitution used in web addresses).

  • When I click on the Start Icon and type the name of a file I am searching for none appear.

    When I click on the Start Icon and type the name of a file I am searching for none appear.
    Using Widows 7

    Are you searching for a file that you downloaded via Firefox?
    If that is the case then you can check the Download Manager (Tools > Downloads) and if that file is listed there then right click that entry and choose > Open Containing Folder. If that entry is grayed then the file is no longer in the original download location and possibly removed by AV software.

  • I name each photo buy replacing the jpeg number with the name. when I burn to disk and open disk the name is not shown. how do I get the name given to show on the burn disk?.

    after I burn the files to dvd and load to view the name does not appear. How do I get the name listed to appear on the burn disk instead of the file number?

    Naming the Photo - or giving it a title - is not the same as naming  file.
    How are you burning to dvd? With iPhoto? If so then the Title will be available in any app that understands basic metadata.
    If you want the title available in the Finder - which does not understand photo metadata  - then you'll need to export the file
    File -> Export
    In the resulting dialogue you'll see a heading for 'File Name'. Choose 'Use Title' from the drop down.
    Regards
    TD

  • How do you change the name of a PDF in the iPad app?

    How do you change the name of a PDF in the iPad app?

    In the file browser view, navigate to Help > Handbook > Copy, edit, delete, manage.
    Please take a look at a section titled "Renaming files".
    Hopefully, the Help > Handbook and What's New are informative for you to get started on Reader for iOS.  If not, let us know what's missing.

  • Urgent!!how to open the file download dialog box????

    Hi all,
    i'm using the browse button for the user to select the file
    and a submit button, which when cliked should open the file
    download dialog box asking for open or save.
    i searched for so many forums and websites and didn't get the
    solution yet.
    i'm using jsp.
    anyone have the jsp code for the same????
    will b more helpful if u send it to me.
    thanx in advance.

    Hi
    Use the Filedialog class.
    Let your button call a method wich contains the following Java code:
    FileDialog filedialog =
    new FileDialog( Frame1.this, "Open a File", FileDialog.LOAD );
    //witch calls this constructor: public FileDialog(Frame parent, String title, int mode)
    //use Filedialog.SAVE to save a file.
    filedialog.show();
    String filename = filedialog.getFile();//to display the name of the file
    String directoryname = filedialog.getDirectory();// to display the directory name

  • HT5934 My iMac won't let me drag, and drop anything from the desktop to other files on the desktop, or anywhere else.

    My iMac won't let me drag, and drop anything from the desktop to other files on the desktop, or anywhere else.

    This procedure is a diagnostic test. It makes no changes to your data.
    Please triple-click anywhere in the line below on this page to select it:
    ls -@Oaen | pbcopy
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the built-in Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    Wait for a new line ending in a dollar sign ($) to appear below what you entered.
    The output of the command will be automatically copied to the Clipboard. If the command produced no output, the Clipboard will be empty. Paste into a reply to this message.
    The Terminal window doesn't show the output. Please don't copy anything from there.
    If any personal information appears in the output, anonymize before posting, but don’t remove the context.

  • The wifi has been lost or disconnected on my iPad. It's the iPad 2 and has not been updated yet. It's IOS 6.1.3 .. how do I add a network back onto it? I have typed in the name and chosen each of the securities and still hasn't connected!

    The wifi has been lost or disconnected on my iPad. It's the iPad 2 and has not been updated yet. It's IOS 6.1.3 .. how do I add a network back onto it? I have typed in the name and chosen each of the securities and still hasn't connected!

    Hey there Luba_kalstad,
    It sounds like you are unable to join your network and cannot see it in the Wi-Fi list in Settings. I would try the troubleshooting outlined in this article named:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    Be sure you're in range of your Wi-Fi router (access point).
    Tap Settings > Wi-Fi and turn Wi-Fi off and on. If your Wi-Fi setting is dimmed, follow these steps.
    Confirm that your Wi-Fi router and cable or DSL modem are connected to power, turned on, and connected to the Internet. If not, refer to your network administrator or Internet service provider (ISP) for assistance.
    Restart your iOS device.
    Tap Settings > Wi-Fi and locate the Wi-Fi network to which you're connected.
    Tap and Forget this Network.
    Try to connect to your desired Wi-Fi network.
    Note: You may need to enter your Wi-Fi password again if your network requires one.
    Turn your Wi-Fi router off and on2. If your ISP also provides cable or phone service, check with them before attempting this step to avoid interruption of service.
    Update your device to the latest version of software.
    Update your Wi-Fi router to the latest firmware2. For AirPort Base Stations, install updates using the AirPort Utility.
    And this section down toward the bottom if needed:
    Unable to locate a Wi-Fi network
    Verify that the network is available by tapping Settings > Wi-Fi and choosing from the available networks.Note: It may take a few seconds for the Wi-Fi network name to appear.
    Move closer to your wireless router (access point) and attempt to locate the Wi-Fi network.
    If you do not see the network you would like to join, you may be attempting to connect to a hidden network. Learn how to join a hidden network.
    Supported Wi-Fi configurations vary by iOS device model. Find out which standards your device supports3.
    Reset network settings by tapping Settings > General > Reset > Reset Network Settings. Note: This will reset all network settings including:
    previously connected Wi-Fi networks and passwords
    recently used Bluetooth accessories
    VPN and APN settings
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • Is it possible to get the style, font and related info of a paragraph of a in design file and write it on the same in design file  on the  left side

    Is it possible to get the style, font and related info of a paragraph text  of a in design file and write  all the stuff on the same in design file  on the  left side with small fonts 
    as
    Lets  this is a text in in design file    :
    style : abc                      we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultur we are going to check the  condition  Agence Wallonne pour la    font 12                                  d'une Agricultu we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultu
    style : xyz                      we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultur we are going to check the  condition  Agence Wallonne pour la    font 10                                  d'une Agricultu we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultu

    Hi Poojith
    Not sure if this would solve your requirment but just in case might be helpful:
    1. We can mix up the HTML and HTMLB components in the JSP Page. However, can access only the HTMLB components in the controller. The following link refers to what customizations are offered by the HTMLB framework:
    [http://www.sapdesignguild.org/resources/htmlb_guidance/]
    2. Another option would be to use AbstractPortalComponents or a simple web app if that's feasible. (where custom UI themes, css and layout are more in control of the developers.)
    Thanks
    Deepak

Maybe you are looking for