Save Target As  ...

Hello,
Not strictly a JAVA question but I have a page that shows a list of documents stored in my db, these docs being of various different types e.g. gif, ms word, lotus wordpro, pdf. When clicking on the doc name, the document is displayed. However, if the doc is to be saved/downloaded by right clicking and using the Save Target As option, when the file dialog box appears, a temporary filename is displayed not the actual filename. Does anybody know how I can set the filename in the save as dialog box or will I have to create my own version of the save as dialog box.
Thanks.

To be honest, the JFileChooser is slow, sluggish and nasty to try to adapt/extend. You'd be better making your own. It might take longer, but you'll probably end up with a more customised, nicer-looking and maybe faster one anyway.
As for your specific problem, I have no idea. Personally, I'd either search the forums, or write my own.

Similar Messages

  • How do I "Save target as ..." when it does not exist on right clicking in Firefox?

    Some web sites allow files and free mp3 tracks to be downloaded by right clicking on an icon and selecting "save target as ...". But Firefox does not have this option. How do others handle this? I have had to go back to Internet Explorer to use this privilege.
    == This happened ==
    Every time Firefox opened
    == Always been so for me.

    no it isn't........this option saves as an HTML document link. it does not download the file.

  • Save link as not the same as Save target as in IE. How do I get svat target as in firfox?

    I am new to Firefox. Downloaded FF4. It is excellent except for I thing, I download files from rapidshare, etc, and Firefox is missing the "save target as" of IE. I tried "save link as", but it does not work correctly - at least not the same as IE. Is there an add-on or tweek to give firefox the "save target as"? or make "save link as" work the same as "save target as"?

    You can drag them out of that folder (or use Cut & Paste) in the Bookmarks Manager (Library) to a more convenient position.
    *https://support.mozilla.org/kb/how-do-i-use-bookmarks

  • Save Target As in IE Opens PDF in a New Window Instead of Downloading

    I work in the IT department at a UK firm of solicitors and we have recently observed issues with using "Save Target As" in Internet Explorer 8 on Windows 7 with Reader XI. Instead of prompting for the path to save the file, as you would expect, it instead opens a new browser window and loads the Adobe Reader plugin to display the file. The download Window does appear but as it doesn't even get as far as prompting for a path to save to obviously it never starts.
    We are able to work around this by clicking the Save button in the Reader plug-in once it has loaded but this isn't practical especially for large or complex documents which may take more than a few seconds to load. The issue does not occur in XP with identical versions of IE and Reader.
    Is anyone aware of a way I can selectively disable this behaviour without disabling the browser plugin as a whole?

    Does that only happen with PDF files, or any files?  My guess is the latter, which indicates a problem with IE.  Try a repair: http://support.microsoft.com/kb/318378

  • Can't use "save target as" feature in Firefox 7.0.1, all files are saved with .htm extension! Why?

    I'm no longe able to save a file using "save target as" feature, when I'm googling for a file.
    No matter what the file extension is (ppt, pdf, doc, etc.), Firefox 7 downloads a .htm useless file.
    I rember I had this issue in FF long time ago! Is this a regression?

    Now up to Firefox 8 and the problem persists. Cannot go to the www.turnitin.com page and login as I used to do -- Firefox does not remember my username or password.
    Still works on Windows, and with other browsers... It would be great if a fix is available.

  • I am using Unix sites and they use links to files. If I use IE I can save target and it works. If I use save as in Firefox it only saves the link. I have res

    http://code.google.com/p/mkgmap-style-sheets/source/browse/#svn%2Ftrunk%2Fstyles%2Fworld
    Is the website. I am trying to download the files. Yes I can open and manually save them but the stock standard IE save target does not exist in Firefox and the Save Link only saves the link. The whole world has struck this problem so please do not say it works. It does not!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Ever thing works as it should in IE.

    On code.google.com, when I compare Fx22 and IE8, the links on that page both want to save the HTML and not the actual code. In both cases, I need to go to the HTML view then right-click and save the "View Raw file" link on the right side to get the actual code file.
    If you need to save a lot of files while browsing, perhaps a subversion client and/or subversion add-on would make it more efficient?

  • Alt-click no longer saves target as

    I just upgraded to Firefox 13.0 on Windows and noticed that alt-click no longer triggers the "Save target as" function. Does this now need to be configured by the user?

    hello, we're mostly users and volunteers here on the sumo forums and are not responsible for those those changes and cannot implement your suggestions - if you want to give feedback to the firefox developers please use https://input.mozilla.org/feedback
    thank you!

  • Is there save target as functionality available in safari?

    Dear folks,
    Is there a equivalent  functionality "IE save target as"  available in safari?.  I would like capture few images available in a web page to be saved as jpg images to my local file system.I am using MAC Book Pro and Moutain Lion  O.S and latest safari browser. Any help is appreciated. Thanks!.

    Right-click a displayed image and select Save Image to Desktop or Save Image As... from the contextual menu. Dragging to the Desktop or a folder will also work sometimes.

  • Link to download and choose save target as...

    How do i creat a link where when the user click on it, it
    will download the file and give the option to choose save target
    as..

    Thanks Walt.
    so for your pc to open a dialog box asking you if you want to
    save that file as a target ... when you click in a link that file
    should be diferent then standards pdf, gif, jpg, etc...????
    But in some pages for example the video is playing and bellow
    there is one link saying click here to download and choose save
    target as...
    that is what i want to do and still didnt understand. I know
    if the user has a realplayer for example, the realplayer can give
    already the option to do it. but those that dont have a
    realplayer...
    is it making any sense...
    Sorry if a bit silly, but i am new in Dreamweaver.
    Thanks anyway.

  • Please help no save target as option is appearing when right clicking

    i have internet explorer 9 and windows 7 and my save target as option is absent when i right click on files is there a reason for this i need this option help would be appreciated

    Hi,
    When did this issue happen?
    This option is by default there. Try reset IE settings and see the results.
    http://support.microsoft.com/kb/923737
    Regards,
    Miya
    This posting is provided "AS IS" with no warranties, and confers no rights. | Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer
    your question. This can be beneficial to other community members reading the thread.

  • Auto save Flash file / Save target as

    Is there a way to put a Flash file on a page and
    automatically prompt the user to "save target as" when they click
    on the link? I am posting the file and a link below to the Flash
    file. I'm hoping to set it up so that when the user clicks on the
    link, they are automatically prompted to "save target as", but not
    sure if this is possible. Help, suggestions? Thanks in
    advance.

    ip the file you want to be downloaded - then point to the
    zipped file.
    --> Adobe Certified Expert *ACE*
    --> www.mudbubble.com
    --> www.keyframer.com
    flash nubee wrote:
    > Is there a way to put a Flash file on a page and
    automatically prompt the user
    > to "save target as" when they click on the link? I am
    posting the file and a
    > link below to the Flash file. I'm hoping to set it up so
    that when the user
    > clicks on the link, they are automatically prompted to
    "save target as", but
    > not sure if this is possible. Help, suggestions? Thanks
    in advance.
    >

  • Cannot save Target Properties

    I am in the Target Properties screen....
    I see fields to add
    Name Value
    Comment
    Line of Business
    Deployment Type
    Location
    Contact
    I fill in a value, but there is no way to save the entries...
    Configuration: OEM/OMS 10.2.0.3
    OS Linux
    Logged in as a super admin user...
    is this a function of certain additional feature "packs"??
    Help...

    thank for update any info...
    I also searched for any possible workaround, and I found some tables and packages that could help, like:
    desc mgmt_target_properties
    Name Null? Type
    TARGET_GUID NOT NULL RAW(16)
    PROPERTY_NAME NOT NULL VARCHAR2(64)
    PROPERTY_TYPE NOT NULL VARCHAR2(64)
    PROPERTY_VALUE VARCHAR2(1024)
    or package
    desc sysman.MGMT_PROPERTIES
    PROCEDURE ADD_PROPERTY_CHANGE_CALLBACK
    Argument Name Type In/Out Default?
    P_PROCEDURE_NAME VARCHAR2(100) IN
    P_TARGET_TYPE VARCHAR2(64) IN DEFAULT
    P_PROPERTY_NAME VARCHAR2(64) IN DEFAULT
    P_NEW_PROPERTY_VALUE VARCHAR2(64) IN DEFAULT
    P_EVAL_ORDER NUMBER(2) IN DEFAULT
    PROCEDURE ADD_SYS_TARGET_PROPERTY
    Argument Name Type In/Out Default?
    P_PROPERTY_NAME VARCHAR2(64) IN
    P_TARGET_TYPE_LIST SMP_EMD_STRING_ARRAY IN
    P_PROPERTY_DISPLAY_NAME VARCHAR2(64) IN DEFAULT
    P_PROPERTY_DISPLAY_NLSID VARCHAR2(64) IN DEFAULT
    P_DEFAULT_VALUE VARCHAR2(1024) IN DEFAULT
    P_COMPUTED_FLAG NUMBER(1) IN DEFAULT
    P_CREDENTIAL_FLAG NUMBER(1) IN DEFAULT
    P_REQUIRED_FLAG NUMBER(1) IN DEFAULT
    P_READ_ONLY_FLAG NUMBER(1) IN DEFAULT
    P_HIDDEN_FLAG NUMBER(1) IN DEFAULT
    PROCEDURE ADD_TARGET_PROPERTY
    Argument Name Type In/Out Default?
    P_PROPERTY_NAME VARCHAR2(64) IN
    P_PROPERTY_TYPE VARCHAR2(64) IN
    P_SYSTEM_FLAG NUMBER(1) IN
    P_CREDENTIAL_FLAG NUMBER(1) IN
    P_REQUIRED_FLAG NUMBER(1) IN
    P_COMPUTED_FLAG NUMBER(1) IN
    P_READ_ONLY_FLAG NUMBER(1) IN
    P_HIDDEN_FLAG NUMBER(1) IN
    P_DEFAULT_VALUE VARCHAR2(1024) IN
    P_PROPERTY_DISPLAY_NAME VARCHAR2(64) IN
    P_PROPERTY_DISPLAY_NLSID VARCHAR2(64) IN
    P_TARGET_TYPE_LIST SMP_EMD_STRING_ARRAY IN
    PROCEDURE ADD_USER_TARGET_PROPERTY
    Argument Name Type In/Out Default?
    P_PROPERTY_NAME VARCHAR2(64) IN
    P_TARGET_TYPE_LIST SMP_EMD_STRING_ARRAY IN
    P_PROPERTY_DISPLAY_NAME VARCHAR2(64) IN DEFAULT
    P_PROPERTY_DISPLAY_NLSID VARCHAR2(64) IN DEFAULT
    P_DEFAULT_VALUE VARCHAR2(1024) IN DEFAULT
    P_COMPUTED_FLAG NUMBER(1) IN DEFAULT
    P_CREDENTIAL_FLAG NUMBER(1) IN DEFAULT
    P_REQUIRED_FLAG NUMBER(1) IN DEFAULT
    P_READ_ONLY_FLAG NUMBER(1) IN DEFAULT
    P_HIDDEN_FLAG NUMBER(1) IN DEFAULT
    PROCEDURE DEL_PROPERTY_CHANGE_CALLBACK
    Argument Name Type In/Out Default?
    P_PROCEDURE_NAME VARCHAR2(100) IN
    P_TARGET_TYPE VARCHAR2(64) IN DEFAULT
    P_PROPERTY_NAME VARCHAR2(64) IN DEFAULT
    P_NEW_PROPERTY_VALUE VARCHAR2(64) IN DEFAULT
    PROCEDURE EXEC_PROPERTY_CHANGE_CALLBACKS
    Argument Name Type In/Out Default?
    P_TARGET_GUID RAW(16) IN
    P_PROPERTY_NAME VARCHAR2(64) IN
    P_OLD_PROPERTY_VALUE VARCHAR2(64) IN
    P_NEW_PROPERTY_VALUE VARCHAR2(64) IN
    PROCEDURE HANDLE_MGMT_TGT_PROPS
    Argument Name Type In/Out Default?
    P_TARGET_GUID RAW(16) IN DEFAULT
    P_PROPERTY_NAME VARCHAR2(64) IN
    P_PROPERTY_TYPE VARCHAR2(64) IN DEFAULT
    P_PROPERTY_VALUE VARCHAR2(1024) IN DEFAULT
    PROCEDURE PROPAGATE_TARGET_PROPERTIES
    Argument Name Type In/Out Default?
    P_TARGET_TYPE VARCHAR2(64) IN
    P_TYPE_META_VER VARCHAR2(128) IN
    PROCEDURE SET_TARGET_PROPERTIES
    Argument Name Type In/Out Default?
    P_TARGET_NAME VARCHAR2(256) IN
    P_TARGET_TYPE VARCHAR2(64) IN
    P_PROPERTIES MGMT_TARGET_PROPERTY_LIST IN
    PROCEDURE SET_TARGET_PROPERTY
    Argument Name Type In/Out Default?
    P_TARGET_NAME VARCHAR2(256) IN
    P_TARGET_TYPE VARCHAR2(64) IN
    P_PROPERTY_NAME VARCHAR2(64) IN
    P_PROPERTY_TYPE VARCHAR2(64) IN
    P_PROPERTY_VALUE VARCHAR2(1024) IN
    but I found no documentation about this and took no risk trying to insert new values.
    Has anyone worked with this before or has any info about this and other objects working on target properties?
    tks.

  • How to 'save target as' from java?

    pardon for the english and pardon if the post is not in the right place.
    the idea to open a webpage (url given) that contains links to several pdf files, and to save those files in the hard disk. how can this be done with java? can anybody help?

    Well first you've got to have a webbrowser or some other widget that's displaying PDF files. Normally webbrowsers invoke acrobat to do this so the point is rather moot there, but suppose you have several pdfs open using lowagie or something. The answer is that your PDFs have to come from somewhere, thus there is a data source, so you just need to save the data from the data source to the disk

  • How do you change the default save as directory when saving a PDF file to your hard drive?

    This is the on-line help instructions on this site:
    Downloading a PDF file to your hard drive
    You can download a PDF file to the hard drive from a web page's link. Downloading PDF files doesn't require the ActiveX plug-in file to be installed. (If you want to open and view the PDF file after downloading it, you must have Acrobat, Adobe Reader, or Acrobat Reader installed.)
    To download a PDF file from a link:
    1. Right-click the link to a PDF file, and then choose Save Target As from the pop-up menu.
    2. In the Save As dialog box, select a location on your hard drive, and then click Save.
    My issue:  I want to save several pdf files (from the Adobe Reader in my browser) one at a time and each time it defaults the save as directory to the desktop and I have to go looking for the directory I last saved a pdf file in.  I got lots of directories and I wish I could change the default setting for the save as directory.  Just a minor thing but irritating as other programs usually will allow you to switch the default save as directory to one of your choosing.

    There is not a way to set the default location from all the forums i searched in the last couple days.
    Russ

  • How to get the target file name from an URL?

    Hi there,
    I am trying to download data from an URL and save the content in a file that have the same name as the file on the server. In some way, what I want to do is pretty similar to what you can do when you do a right click on a link in Internet Explorer (or any other web browser) and choose "save target as".
    If the URL is a direct link to the file (for example: http://java.sun.com/images/e8_java_logo_red.jpg ), I do not have any problem:
    URL url = new URL("http://java.sun.com/images/e8_java_logo_red.jpg");
    System.out.println("Opening connection to " + url + "...");
    // Copy resource to local file                   
    InputStream is = url.openStream();
    FileOutputStream fos=null;
    String fileName = null;
    StringTokenizer st=new StringTokenizer(url.getFile(), "/");
    while (st.hasMoreTokens())
                    fileName=st.nextToken();
    System.out.println("The file name will be: " + fileName);
    File localFile= new File(System.getProperty("user.dir"), fileName);
    fos = new FileOutputStream(localFile);
    try {
        byte[] buf = new byte[1024];
        int i = 0;
        while ((i = is.read(buf)) != -1) {
            fos.write(buf, 0, i);
    } catch (Throwable e) {
        e.printStackTrace();
    } finally {
        if (is != null)
            is.close();
        if (fos != null)
            fos.close();
    }Everything is fine, the file name I get is "e8_java_logo_red.jpg", which is what I expect to get.
    However, if the URL is an indirect link to the file (for example: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719 , which link to a file named JavaSetup6u18-rv.exe ), the similar code return AutoDL?BundleId=37719 as file name, when I would like to have JavaSetup6u18-rv.exe .
    URL url = new URL("http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719");
    System.out.println("Opening connection to " + url + "...");
    // Copy resource to local file                   
    InputStream is = url.openStream();
    FileOutputStream fos=null;
    String fileName = null;
    StringTokenizer st=new StringTokenizer(url.getFile(), "/");
    while (st.hasMoreTokens())
                    fileName=st.nextToken();
    System.out.println("The file name will be: " + fileName);
    File localFile= new File(System.getProperty("user.dir"), fileName);
    fos = new FileOutputStream(localFile);
    try {
        byte[] buf = new byte[1024];
        int i = 0;
        while ((i = is.read(buf)) != -1) {
            fos.write(buf, 0, i);
    } catch (Throwable e) {
        e.printStackTrace();
    } finally {
        if (is != null)
            is.close();
        if (fos != null)
            fos.close();
    }Do you know how I can do that.
    Thanks for your help
    // JB
    Edited by: jb-from-sydney on Feb 9, 2010 10:37 PM

    Thanks for your answer.
    By following your idea, I found out that one of the header ( content-disposition ) can contain the name to be used if the file is downloaded. Here is the full code that allow you to download locally a file on the Internet:
          * Download locally a file from a given URL.
          * @param url - the url.
          * @param destinationFolder - The destination folder.
          * @return the file
          * @throws IOException Signals that an I/O exception has occurred.
         public static final File downloadFile(URL url, File destinationFolder) throws IOException {
              URLConnection urlC = url.openConnection();
              InputStream is = urlC.getInputStream();
              FileOutputStream fos = null;
              String fileName = getFileName(urlC);
              destinationFolder.mkdirs();
              File localFile = new File(destinationFolder, fileName);
              fos = new FileOutputStream(localFile);
              try {
                   byte[] buf = new byte[1024];
                   int i = 0;
                   while ((i = is.read(buf)) != -1) {
                        fos.write(buf, 0, i);
              } finally {
                   if (is != null)
                        is.close();
                   if (fos != null)
                        fos.close();
              return localFile;
          * Returns the file name associated to an url connection.<br />
          * The result is not a path but just a file name.
          * @param urlC - the url connection
          * @return the file name
          * @throws IOException Signals that an I/O exception has occurred.
         private static final String getFileName(URLConnection urlC) throws IOException {
              String fileName = null;
              String contentDisposition = urlC.getHeaderField("content-disposition");
              if (contentDisposition != null) {
                   fileName = extractFileNameFromContentDisposition(contentDisposition);
              // if the file name cannot be extracted from the content-disposition
              // header, using the url.getFilename() method
              if (fileName == null) {
                   StringTokenizer st = new StringTokenizer(urlC.getURL().getFile(), "/");
                   while (st.hasMoreTokens())
                        fileName = st.nextToken();
              return fileName;
          * Extract the file name from the content disposition header.
          * <p>
          * See <a
          * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html">http:
          * //www.w3.org/Protocols/rfc2616/rfc2616-sec19.html</a> for detailled
          * information regarding the headers in HTML.
          * @param contentDisposition - the content-disposition header. Cannot be
          *            <code>null>/code>.
          * @return the file name, or <code>null</code> if the content-disposition
          *         header does not contain the filename attribute.
         private static final String extractFileNameFromContentDisposition(
                   String contentDisposition) {
              String[] attributes = contentDisposition.split(";");
              for (String a : attributes) {
                   if (a.toLowerCase().contains("filename")) {
                        // The attribute is the file name. The filename is between
                        // quotes.
                        return a.substring(a.indexOf('\"') + 1, a.lastIndexOf('\"'));
              // not found
              return null;
         }

Maybe you are looking for