Incorrect file name while downloading it with JDK1.4

Hello people!
I'm facing a strange problem in my downloading servlet with JDK1.4 and Tomcat4.1 when trying to set Cyrillic file name: download window pops up with some abracadabra name. After I click "Open" twice the file opens correctly. It never happens with JDK1.3.
Some backward compatibility feature from SUN???
Here is the code:
res.setContentType("application/octet-stream; charset=windows-1251");
res.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");

I'm almost sure it's a bug in Tomcat 4.1. All you have to do is to switch from 4.1 to 4.0 and the problem is fixed. We also checked what line goes to the response header - it's correct.
Did I mention this problem happens even with Latin charactes? The file name is correct but download box opens twice.

Similar Messages

  • Incorrect file name when downloading an attachment on MSIE 6.0

    Hi guys,
    Need some help, please,
    In a web application on a user request a CVS file is generated with a servlet.
    The problem is that when the user press the download button in the file dialog appears an incorrect file name ( instead of the right one, the name of the struts-action ), this is happening only in MSIE, with Firefox is working ok.
    Here is the snippet:
    response.setContentType("application/download");
    response.setHeader("Pragma","");
    response.setHeader("Cache-Control","");
    String externNo = "some_file_name";
    response.setHeader("Content-Disposition", "attachment; filename=\""
    + externNo + ".csv\"");
    ... setting the content ...
    I've found lots of topics about this subject, and try different settings for servlet header ( Cache-Control - public,etc), but still without success.
    Can this be from a server setting?? We have 2 j2ee serversone on linux and one on windows. And the problem is only for the linux server, which I'm not sure if it have the same configuration.
    Thank You
    A nice day!
    Bogdan

    Hi,
    In the file dialog should be "some_file_name.csv" but is "saveorderincsv".
    Here is the code from jsp:
       function savePressed() {
           top.location.href = '/b2b/saveorderincsv.do';
           return true;
    <input
         class="green" type="button"
            onclick="savePressed()"> .....
    config.xml:
    <action path="/b2b/saveorderincsv"
         type="com.moeller.isa.action.salesdocs.SaveOrderToCSVAction">
                   <forward name="success" path="/b2b/saveorder" />
         </action>...
    web.xml:
    <servlet>
      <servlet-name>SaveOrderToCVSServlet</servlet-name>
    <servlet-class>com.moeller.isa.servlets.Z_SaveOrderSimulateServlet</servlet-class>
         </servlet>
    <servlet-mapping>
              <servlet-name>SaveOrderToCVSServlet</servlet-name>
              <url-pattern>b2b/saveorder</url-pattern>
         </servlet-mapping>
    ....I've also try with "application/x-download" and without quotes, but still the same error.
    10x
    Bogdan

  • How to get the file name from downloads folder with the applescript??

    Hi All..
    I am downloading an application to downloads folder, I need to install the same application after downloading programatically.
    So how do I get the filename in runtime while downloading or after downloading from downloads folder with Applescript or Java?
    Also my download URL link doesnot contain full name of the download file.
    Pls suggest.

    Hi,
    The best method is to use curl.
    Other methods are not reliable, but can work, it depends on several factors (what the script does, what the user does).
    Here is an example with the curl command:
    set tUrl to "http://sourceforge.net/projects/vlc/files/2.0.4/macosx/vlc-2.0.4.dmg/download?ac cel_key=60%3A1350656196%3Ahttp%253A//www.videolan.org/vlc/download-macosx.html%3 A7233e4e9%245818d66f39b0576e1e9c4a0f3b46b1991180bfdd&click_id=976a88ee-19f7-11e2 -9a21-0200ac1d1d8e&source=accel"
    set dFolder to path to downloads folder
    tell application "Finder" to set newFolder to (make new folder at dFolder) as string
    set f to quoted form of POSIX path of newFolder
    do shell script "cd " & f & " && curl -L " & tUrl & " -o 'vlc.dmg'" -- download  to file "vlc.dmg"
    set downloadedFile to newFolder & "vlc.dmg" --<-- HFS path
    --do something with the downloadedFile

  • Bug:Downloading pdf file from the web,file name in dialog box populates with incorrect file name

    Hi Gurus
    When downloading any pdf file from the web using adobe Reader X the file name dialog box populates with incorrect file name
    compared to the saved file name of the document downloaded.
    Clarity
    1. Download any pdf file from the web
    2. Click File, Save as note the populated File Name
    3. Compare the populated file name with the saved file name of the documant yuo are downloading.
    4. The file Name is incorrect...
    Is there any work around on this issue?Can someone please help?..
    OS:Windows7
    Reader: Adobe Reader X
    I've tried a couple of other versions and still get the same results...

    Are you downloading the file (right-click, save link as), or just opening it by clicking it?
    If the latter, then what happens is the file is loaded to the temporary internet files folder by IE and assigned a temporary name, which is then used when you're trying to save it.
    You can test this out by going to File - Document Properties before trying to save and looking at the file's location.

  • How to retain file name while saving file on archive servers

    Hi Experts,
    I am using function modules:
    ARCHIVOBJECT_CREATE_TABLE and ARCHIV_CONNECTION_INSERT for inserting a file to archive server and for linking it with a document.
    Then I am reading the URL using FM: SCMS_AO_URL_READ. When I get this URL and download that file, the file name will be always defaulted to 'pclHTTP.dll'. I debugged these FMs to a certain extent and found that this name comes from CREP_HTTP-HTTP_SCRPT table.
    Is there any way I can retain the file name while saving it so that when I read the URL it has correct file name in it?
    Please help.
    Regards,
    Anand Kolte

    Hi Max,
    In case when downloading one file it is fine. But if I want to download 10 files at once and later if I go to my downloads, every file will be having similar name. Unless we open the file, we cannot know what file it is.
    Regards,
    Anand

  • Incorrect file name within folder

    I have saved a series of Captivate v4 projects in a folder. I have saved the projects with their relevant names. I have updated the project info details on each project to correctly reflect the name of the project chapter etc.
    Can anyone explain why then, when I place my mouse pointer over any of the projects in the folder, for example "CBT Ops Aware KN Login v2_4 Ch6", the pop up "info" window shows the title "v2 KN LoginBooking Sea with OL-C-CBT...." ? This is the name of another project I created, but back in Feb 2010 !.
    Where is this "old" file name coming from and why is is attached to an unrelated project ?
    NEL

    I followed (to the letter) your instructions and it did not fix the issue.
    However, after having tried your suggestion, I did a right click on the project, and in Properties/Summary I can see the "incorrect file name:
    I might have copied and then edited the new project titled "CBT Ops Aware..." from an old project titled "v2 KN Login..." as displayed now in the Summary Title panel, so maybe this is where it all stems from.
    Whilst this is not a show stopper, any ideas why the new project has not overwritten the old project name in the properties summary panel ?
    Could it have other knock-on effects ?
    Noel

  • How to set default file path while downloading alv output

    Hi,
    Can anyone tell me that how to set default file path while downloading the ALV output to system using Local file button on tool bar.
    Please look below screenshots:
    Kindly help me resolve it.
    Thanks in advance.
    Regards,
    Ashutosh Katara

    This information initial value is (maybe) stored in Windows Register (register.exe) at Software\SAP\SAPGUI Front\SAP Frontend Server\Filetransfer -> PathDownload, you can read it thru class CL_GUI_FRONTEND_SERVICES method GET_UPLOAD_DOWNLOAD_PATH and update it thru method REGISTRY_SET_VALUE. (Else there may be some parameter ID to force data, but I'm no longer sure)
    Regards,
    Raymond

  • How to find PG.xml file name and path associated with a FUNCTION

    Hi,
    I am having a function:IRC_VIS_HOME_PAGE with Web HTML value as below:
    OA.jsp?akRegionCode=IRC_VIS_HOME_PAGE&akRegionApplicationId=800&OAPB=IRC_BRAND
    How to find PG.xml file name and path assoicated with above funtion.
    Thanks,
    ashok

    Ashok,
    Function IRC_VIS_HOME_PAGE will have 2 parameter defined for it which are OASF and OAHP where
    OASF=<SelectedFunctionName> - this tells the Framework to select this function in the given "Home Page" menu context.
    OAHP=<HomePageMenuName> - this is used ONLY with the OASF parameter, and it is used to establish the current menu context. It should point to a "Home Page" menu.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Incorrect file size in download list

    Incorrect file size in download list.
    Use russian localized Safari. If I download file and it size is 12 Mb then Safari show 12 Gb!

    Hi
    You can try the following approach.
    First you can download all the records to one file and than using the following 
    CL_GUI_FRONTEND_SERVICES => FILE_GET_SIZE
    You can find the size, when you have size value.
    You can do division as per your requirement and loop the internal table and download accordingly
    Regards
    Madhan

  • I have got a TROJAN from your webbside when I uppgrade. File name W97M/Downloader.afp!!  What to do?????

    I have got a TROJAN from your webbside when I uppgrade. File name W97M/Downloader.afp!!  What to do?????

    This is a user to user forum.
    Use the contact page to get a hold of Adobe and give them as much detail as possible on where you received the virus. It is possible that the virus became active about the same time you downloaded from Adobe making you think that is where it came from. But viruses have been known to activate after a set time. That may or may not be the case for you, just making you aware that something else could have been the culprit.

  • Does Adobe Send allow you to select how many days your files can be downloaded - as with Adobe Send Now? Also, why don't I see the virus scanning message any longer with "Send" versus "Send Now"?

    Does Adobe Send allow you to select how many days your files can be downloaded - as with Adobe Send Now? Also, why don't I see the virus scanning message any longer with "Send" versus "Send Now"?

    We relied upon the "days available for download" to get people to take
    action more quickly. The "virus scanning" progress bar was simply another
    way of knowing this activity was actually taking place - unless this is
    written somewhere in the Adobe Send User Guide.....wherever that is.
    On Tue, Dec 2, 2014 at 12:09 PM, bob.treitman <[email protected]>

  • How to set attched file name while sending email through ABAP

    Hi All- tell me how to set attched file name while sending email through ABAP.
    regards...
    Abhay

    Sure,  when you are adding your entry to the packing list,  give the name in the obj_name field.
    *File 2
      mailbin = 'This is file 2'.
      append mailbin.
      data: start type i.
      data: end type i.
      start = tab_lines + 1.
      describe table mailbin lines end.
      mailpack-transf_bin = 'X'.
      mailpack-head_start = 1.
      mailpack-head_num = 1.
      mailpack-body_start = start.
      mailpack-body_num = end.
      mailpack-doc_type = 'TXT'.
      mailpack-obj_name = 'TEST2'.        "<-  RIGHT HERE
      mailpack-obj_descr = 'Subject'.
      mailpack-doc_size = tab_lines * 255.
      append mailpack.
    Regards,
    RIch Heilman

  • Firefox doesn't reconvert special characters in the file names when download a file with any special characters in the file name

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/815207]</blockquote><br>
    if i try to download a file with any special characters in file name (e.g. File_Name.pdf), it doesn't reconvert them from the "sanitize url" process and download the file an incorrect name (e.g. File%5FName.pdf).
    This is really annoying.
    Thank you for your patient

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • Same file name when downloading new pics

    The prev camera I had (Sony Cyber shot/Steady Shot?)always kept dynamic file numbers/names however now have Nikon D90 and now if do search on a file number now get numerous pics under same file name as new camera restarts at same number all the time.
    Is there an easy way to deal with this. I would really not want to have to rename all files as soon as I download them. That can be over 300 pics at a time.
    Any help would be greatly appreciated! Thanks!

    When I say file name I mean the name/number that appears under the pic in iphoto.
    Yes that is the file name
    Do most people leave these numbers or change them, do you know?
    Most people leave it - some preprocess all photos and assign meaningful file names and then import
    I know you can assign words to them and then retrieve them by calling up all pics associated with that word(s).
    You can assign a title (which can optionally be used as the file name when you export photos), a description, keywords, and a rating
    Do you have any other hints for me? Do you use the Mangler software you referred to in the prev post?
    Normally I do not modify the file names - if I get photos from someone else I usually use name mangler to identify the source (which I could do with keywords but for photos that are not mine I prefer having the file name show the source) - once in a while I will change some but normally I just import directly from the camera and ignore the file name
    LN

  • Incorrect file name when importing pictures from camera

    I am using PE 10 on Mac Snow Leopard.
    When I import pictures from my camera and select "Rename Files" with "Custom Date" + "Shot Date" (any format), the file name includes the custom name correctly, but the date part of the file name is some random date (with a weird year: 1913, 1969). Note the example shown on the Photo Downloader is usually the one used. The shot date in the meta data is usually correct. This appears to be similar to a problem when using the "Create Subfolder" option.
    Any ideas why or a work-around?
    I was using PE 8 and did not have this problem.

    Hi dannrendon2,
    Have you successfully run the PSE10_Hot.dmg file? You will not see any change in PSE10 or PhotoDownloader , it is just for fixing the issue of incorrect date format .
    Please follow all the steps mentioned in KB article link mentioned above. Finally when you installed the updater there would be a message of successful installation .
    If there is a failure in your updating process [In your case it is second attempt of updation, there may be a failure] , uninstall your application , check if there is any residual file in application folder under Elements Organizer or Photoshop Elements (delete them). Now again install PSE10 and try to update PSE10_HotFix.dmg updater. There should be a successfully completed message.
    Thanks,
    Nizam

Maybe you are looking for