Setting the title for File download dialog when using content-disposition

I am trying to send a file from server to client (browser). I am setting the content type of the resopnse and using the "content-disposition" header and giving the filename.
But the issue is, when it is downloading and the dialog box is showing the progress bar, The title of the dialog box is showing something like "40% of localhost:9080.....". It doesn't show the file name in the title bar. Also, if the URL is very long (I am passing some get parameters and the servlet name is also long), I get junk characters like small boxes.
How to set this title in the servlet?

Is there a reason why you have to use FileReference.Save versus File.browseForSave?  In Adobe AIR, the File class, which extends the FileReference class,    provides more capabilities and has less security restrictions than the FileReference class.  Using File.browseForSave, it has a title:String parameter which is a string that is diplayed in the title bar of the dialog box.

Similar Messages

  • Avoiding the 'Save PDF File As' dialog when printing to the adobe PDF printer from a service

    Hello, can someone please help.
    I have Adobe Acrobat 8 Pro installed.
    I have an in house application which (among many other things) effectively monitors a directory and prints the file to the default printer. It works fine when run as an application.
    I have set the defaults on the Adobe PDF printer to put the output PDF file into a directory and not to open it so it works silently without prompts.
    When I run my application as a service, it brings up the 'Save PDF File As' dialog and I would like to avoid this. My impression is that if I put the right registry key in then it will work.
    I do not want to do any scripting if I can avoid it.
    Thanks for all constructive help given.

    Thank for your help Bill, but changing settings in the distiller did not seem to work. As my application prints directly to the default application without using anything specific to Acrobat, I was hoping there was a simple way forward. A colleague suggested copying registry entries from the account I logged on as to the S-1-5-18 entry, then rebooting. This had no effect as the prompt still comes up.
    Aandi, I don't have the Acrobat SDK or any experience of it.
    Also I'm not sure where any code/script would sit since the application is stable and so I would rather not change it.
    If it amounts to a few lines of javascript sitting outside the application then that would be of interest.

  • Set default filename for file save dialog on Save button click

    Hi,
    I am using AxAcroPDF (version 9.0) control to view pdf files in windows forms (C#). The pdf loads into the viewer in the form. Now, when I click on the Save button in the viewer, a Save dialog pops up with a default filename having complete path info.
    If I have loaded the pdf file into AxAcroPDF viewer with filename:
    "C:\Documents and Settings\KB_Kravi\My Documents\CustomerList.pdf"
    then in the save dialog, the default filename will be:
    "C_Documents_and_Settings_KB_Kravi_My Documents_CustomerList.pdf"
    Is there any option to set the default filename in the save dialog to some short name, instead of this lengthy name?
    Thanks,
    Ravi.

    Hi,
    I've found a solution.
    public void Open(string filePath)
    axAcroPDF.LoadFile(filePath);
    //this will set the correct name in the save file dialog.
    axAcroPDF.src = filePath;
    Thanks for your help.
    Freedon

  • Set default filename for file save dialog

    Hi,
    I am using AxAcroPDF control to view pdf files in windows forms.
    Is there any option to set the default filename in the save dialog?
    Thanks for your help.
    Freedon

    Hi,
    I've found a solution.
    public void Open(string filePath)
    axAcroPDF.LoadFile(filePath);
    //this will set the correct name in the save file dialog.
    axAcroPDF.src = filePath;
    Thanks for your help.
    Freedon

  • Why must I set the AD as "default user store " when use Kerberos scheme ???

    Hi ,
    I am using kerberos scheme to authenticate user by OAM after user logged into the AD domain . It works well when there is only 1 AD domain ,for I can set that AD as the default identity store so that OAM can find user from the store and set the header .
    But when there are two totally different AD domains with different users , there will be a question. That is , I can only set one AD domain as the default identity store. So when I use the other AD domain to visit webgate protected resource, OAM notice me the the user/password error. But if the AD user exist in both AD domains, it will be OK, because the user mapping is finished correctly.
    logs here:
    [2011-07-26T22:19:18.599+08:00] [oam_server1] [ERROR] [OAMSSA-20040] [oracle.oam.user.identity.provider] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: cbefca7cded5e992:3fca7bfd:131657b3817:-8000-0000000000000c19,0] [APP: oam_server] Could not modify user attribute for user : sAMAccountName, attribute : smicer, value : {2} .
    [2011-07-26T22:19:18.600+08:00] [oam_server1] [ERROR] [] [oracle.oam.engine.authn] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: cbefca7cded5e992:3fca7bfd:131657b3817:-8000-0000000000000c19,0] [APP: oam_server] Failure getting users by attribute : sAMAccountName, value : smicer.[[
    oracle.security.am.engines.common.identity.provider.exceptions.IdentityProviderException: OAMSSA-20016: Failure getting users by attribute : sAMAccountName, value : smicer.
         at oracle.security.am.engines.common.identity.provider.impl.UserProviderImpl.getUsersByAttribute(UserProviderImpl.java:342)
         at oracle.security.am.engines.common.identity.provider.impl.IdentityProviderImpl.getUsersByAttribute(IdentityProviderImpl.java:656)
         at oracle.security.am.engines.common.identity.provider.impl.OracleUserIdentityProvider.getUsersByAttribute(OracleUserIdentityProvider.java:288)
         at oracle.security.am.engine.authn.internal.executor.KerberosModuleExecutor.execute(KerberosModuleExecutor.java:254)
         at oracle.security.am.engine.authn.internal.executor.AuthenticationSchemeExecutor.execute(AuthenticationSchemeExecutor.java:94)
         at oracle.security.am.engine.authn.internal.controller.AuthenticationEngineControllerImpl.validateUser(AuthenticationEngineControllerImpl.java:261)
         at oracle.security.am.engines.enginecontroller.AuthnEngineController.authenticateUser(AuthnEngineController.java:669)
         at oracle.security.am.engines.enginecontroller.AuthnEngineController.processEvent(AuthnEngineController.java:294)
         at oracle.security.am.controller.MasterController.processEvent(MasterController.java:354)
         at oracle.security.am.controller.MasterController.processRequest(MasterController.java:517)
         at oracle.security.am.controller.MasterController.process(MasterController.java:457)
         at oracle.security.am.pbl.PBLFlowManager.delegateToMasterController(PBLFlowManager.java:209)
         at oracle.security.am.pbl.PBLFlowManager.handleBaseEvent(PBLFlowManager.java:147)
         at oracle.security.am.pbl.PBLFlowManager.processRequest(PBLFlowManager.java:107)
         at oracle.security.am.pbl.transport.http.AMServlet.handleRequest(AMServlet.java:168)
         at oracle.security.am.pbl.transport.http.AMServlet.doPost(AMServlet.java:133)
         at oracle.security.am.pbl.transport.http.AMServlet.doGet(AMServlet.java:673)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:523)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at oracle.security.am.pbl.transport.http.CredCollectServlet.getCredentials(CredCollectServlet.java:148)
         at oracle.security.am.pbl.transport.http.CredCollectServlet.doPost(CredCollectServlet.java:84)
         at oracle.security.am.pbl.transport.http.CredCollectServlet.doGet(CredCollectServlet.java:71)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.am.agent.wls.filters.OAMServletAuthenticationFilter.doFilter(OAMServletAuthenticationFilter.java:265)
         at oracle.security.am.agent.wls.filters.OAMValidationSystemFilter.doFilter(OAMValidationSystemFilter.java:133)
         at oracle.security.wls.oamagent.OAMAgentWrapperFilter.doFilter(OAMAgentWrapperFilter.java:120)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: oracle.security.idm.ObjectNotFoundException: No User found matching the criteria
         at oracle.security.idm.providers.stdldap.util.DirectSearchResponse.initSearch(DirectSearchResponse.java:174)
         at oracle.security.idm.providers.stdldap.util.NonPagedSearchResponse.<init>(NonPagedSearchResponse.java:52)
         at oracle.security.idm.providers.stdldap.util.NonPagedSearchResponse.<init>(NonPagedSearchResponse.java:43)
         at oracle.security.idm.providers.stdldap.util.LDAPRealm.searchUsers(LDAPRealm.java:489)
         at oracle.security.idm.providers.stdldap.LDIdentityStore.search(LDIdentityStore.java:274)
         at oracle.security.idm.providers.stdldap.LDIdentityStore.searchUsers(LDIdentityStore.java:367)
         at oracle.security.am.engines.common.identity.provider.impl.UserProviderImpl.getUsersByAttribute(UserProviderImpl.java:314)
         ... 57 more
    It seems OAM must set the AD as "default user store " , and only if so , AD domain users can login to webgate protected resources by kerberos .
    So, how can I make 2 AD available together ? Can you kindly give some advice? It will be very appreciated.
    Thanks !!

    1) Should my setup be defaulting to 32-bit compilersYes. On Solaris compilers generate 32-bit code by default
    2) I have read that adding -m64 to the compile command will make it 64-bit, is this accurate?It will make compiler produce 64-bit binaries.
    Compiler itself will stay 32-bit ;-)
    3) Is there a way to set the compilers to default to 64-bit so that the user doesn't have to specify -m64?No. At least no compiler-specific way. Only UNIX general tricks (shell alias, shell script etc)
    4) Does everyone just use -m64 and forget about it?Yep. They have no choice

  • How do i set the homepage for new tabs? when i open tabs i would like it to go to google but i cannot find out how to do this.

    when i open a new tab in firefox, it takes to me to a 'fast browser search' page and i would like to set it to open google.co.uk instead :(

    It would seem if your choose "Show my windows and tabs from last time" '''''and''''',
    *when you last closed Firefox, you had no web site open (just a blank tab), that it would open just that blank tab
    *when you last closed Firefox, you had one or more tabs/web site open, that would allow you to "Restore Previous Session"
    #Have you tried that?
    #If so, what is happening in each circumstance when you reopen Firefox?
    '''Restore Previous Session'''<br />
    Open tabs are automatically saved when closing Firefox beginning in Firefox 4. To open your last session, after Firefox starts, click History > Restore Previous Session. For this to work
    #You must be remembering history (Options > Privacy > Remember my browsing history).
    #*See [https://support.mozilla.com/en-US/kb/Options%20window%20-%20Privacy%20panel Options window-Privacy panel]
    #You must not be using Private Browsing or permanent Private Browsing
    #*See [https://support.mozilla.com/en-US/kb/Private%20Browsing Private Browsing]
    #You must not use Clear Recent History or Clear history when Firefox closes
    #*See [https://support.mozilla.com/en-US/kb/Clear%20Recent%20History Clear Recent History]
    #*See [https://support.mozilla.com/en-US/kb/Options%20window%20-%20Privacy%20panel Options window-Privacy panel]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You need to update some plug-ins:
    *Plug-in check: https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]

  • Does Multithreading for file transfers work when using the WebDAV protocol?

    I am looking at recommending an upgrade from CS5.5 to CS6 for my job, but I am wondering if our server system will be able to use the multiple file upload and download feature new to CS6.  If this is not available for WebDAV then there is not much of a point on the Dreamweaver side for us to upgrade.
    Thanks

    From the documenation:
    http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7eb4a .html
    "Background file transfer works for all of the transfer protocols supported by Dreamweaver: FTP, SFTP, LAN, WebDAV, Subversion, and RDS."
    Get the 30-Day trial to compare features.
    Nancy O.

  • CreateNonModalExternalWindow not setting the title

    Hi,
    I am using createNonModalExternalWindow to open up a document.The document opens up fine but the document name is not the title I set, it's the complete URL. I tried setTitle and I tried using createExternalWindow also but got the same result.
    Any ideas.
    Thanks.
    MS.

    Hi MSR,
        When using a URL to launch a new window with the createNonModalExternalWindow API, the title String doesn't work. I don't know why the API has a title. Since a new browser window is launched with the requested URL the browser will take the title that is set in the HTML file. Since Webdynpro is not generating the HTML in this case there is no possibility of setting the title through Webdynpro.
       You can only set the Title for Webdynpro windows. The setTitle() api will work with Webdynpro windows only. While using the createNonModalExternalWindow or createExternalWindow the title in the browser window will be the same as the one when you directly launch the URL in the browser.
    Regards,
    Sanyev

  • Java WebDynpro's and IE security settings for file download

    We have a EP 7.0 SP13 environment on which we have deployed a number of own developed java webdynpro's. In some of these webdynpro's we provide the file download functionality. The portal and webdynpro's are used by both internal personnel and external customers.
    On the other hand the default Internet security settings for Internet Explorer, disable "Automatic prompting for file downloads".
    When a user, with these default security settings active, tries to use our webdynpro's file download functionality, the screen seems to refreshes but no file download starts. When (s)he retries, the session runs for some minutes and gives following error message:
    "com.sap.tc.webdynpro.services.session.LockException: Thread SAPEngine_Application_Thread[impl:3]_20 failed to acquire exclusive lock on client session ClientSession".
    This behavior is explained in SAPNote 1234847. Webdynpro provides a single-thread module, meaning a user session is blocked for the during of the request. And because the previous file download isn't yet completed the new try can't start.
    Issue now, although the users IE settings allow file downloads and don't block pop up's, he can't download the file and even isn't made aware of the cause of the failure.
    How can we avoid this issue, without having to communicate the
    application requires specific browser settings?

    Welcome to the Apple Support Communities
    See > http://support.apple.com/kb/HT5290
    You can install the program using different ways:
    1. Right-click the application installer and choose Open.
    2. Go to System Preferences > Security and Privacy and select Anywhere in Allow applications downloaded from

  • How to set column title for CL_SALV_TREE

    Dear all,
    I am using CL_SALV_TREE to create a report. But, some unexpected problem comes up. I have used below code to set the title for each column:
      LR_COLUMNS = GR_TREE->GET_COLUMNS( ).
      LR_COLUMN = LR_COLUMNS->GET_COLUMN( 'FIELDNAME' ).
      LR_COLUMN->SET_LONG_TEXT( 'Long Text' ).
      LR_COLUMN->SET_MEDIUM_TEXT( 'Medium Text' ).
      LR_COLUMN->SET_SHORT_TEXT( 'Short Text' ).
    But, it seems that above code does not take effect when report is running. The title for column remains the info of ABAP Dictionary. Is anyone can help me to resolve this problem? It's very urgent for me!
    Looking forward to receiving your replies! Thank you very much!
    Justin,

    Hello Justin
    I copied the sample report <b>SALV_DEMO_TREE_FUNCTIONS</b> (available on IDES ECC 5.0) and added the following coding to routine <i>set_columns_technical</i>:
    [code]&----
    *&      Form  set_columns_technical
          text
    FORM set_columns_technical.
      DATA: lr_columns TYPE REF TO cl_salv_columns,
            lr_column  TYPE REF TO cl_salv_column.
      lr_columns = gr_tree->get_columns( ).
      lr_columns->set_optimize( abap_true ).
      lr_columns->set_column_position( columnname = 'PRICE'
                                       position   = 1 ).
    change a column's alignment
      TRY.
          lr_column ?= lr_columns->get_column( 'CURRENCY' ).
          lr_column->set_alignment( if_salv_c_alignment=>right ).
    "$Comment: added coding
          DATA:
            ld_short    TYPE scrtext_s,
            ld_medium   TYPE scrtext_m,
            ld_long     TYPE scrtext_l.
          ld_short = 'Short'.
          lr_column->set_short_text( ld_short ).
          ld_medium = 'Medium Col Text'.
          lr_column->set_medium_text( ld_medium ).
          ld_long = 'Long Column Text'.
          lr_column->set_long_text( ld_long ).
    "$Comment: added coding
        CATCH cx_salv_not_found.                            "#EC NO_HANDLER
      ENDTRY.
    ...[/code]
    At least the new short text is displayed on the ALV tree. I assume that you have to be very careful and scrupulous in choosing the correct data types for the method calls.
    Regards
      Uwe

  • Problem in file download dialog

    Hi,
    I am using the following code to download a PDF file. (Whiich is present in the database and I am retriving it using JDBC call).
                        InputStream in = null;
                        HttpServletResponse response = ctx.response();
                        response.setContentType ("application/pdf");
                        response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
                        in = (InputStream)requestHandler.read(rparams);
                        byte[] buf = new byte[4096];
                        int len;
                        while((len = in.read(buf)) > 0)
                             out.write(buf, 0, len);
                        in.close();
                        out.flush();
                        out.close();                    
                        response.flushBuffer();
    Now when user is clicking on the specified link, file download dialog is coming, if user clicks on save the file is getting saved successfully but if user clicks on OK, it is giving the error, "There was an error opening this document. The file does not exist".
    Could anyone tell me what may be the problem in the code?
    Thanks in advance
    Amit

    Following code is returning the InputStream object:
         Blob document = null;
         QueryManager qm = null;
         int status = -1;
         InputStream dataStream = null;
         String sqlReadDocument = "select document from opr_t_aw_documents where id='"+id+"' and end_date > sysdate";
         log.debug("sqlReadDocument is "+sqlReadDocument);
              try
                   qm = new QueryManager();
                   ArrayList inParams = new ArrayList();
                   ResultSet result;
                   result = qm.performPrepQuery(sqlReadDocument, inParams);
                   if(result != null)
                        while(result.next())
                             document = result.getBlob(1);
                             if(document != null)
                                  dataStream = document.getBinaryStream();
    and out is simply response.getOutputStream().
    Please let me know in case you need any further info.
    Thanks,
    Amit

  • JPopupmenu - cannot set the title...

    Hai Friends,
    I couln't set the title for the jpopupmenu using the following....
    JPopupMenu menu = new JPopupMenu("My Title");
    Is there any other way... can anyone give me suggestions.....
    Regards,
    Ciya

    From the documentation:
    the string that a UI may use to display as a title for the popup menu.
    I've never seen a UI that actually uses this field. At least no default UI that comes with the JDK.

  • 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

  • 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

  • Set filename for file download

    Hi
    i have a servlet that sends a file to the client to be downloaded. When the client requests the file the dowload dialogue pops asking if the user wants to download/open but the name of the file is always the servlet name were it originates. Is there any way to set the filename and extension in the servlet e.g ExampleResult1234.csv and send this to the client so that when the dialogue pops up it is set?
    Current Servlet Code:
    String output = "some data from database in csv format";
            response.setContentType("application/binary");
         response.getWriter().write(output);Thanks
    David

    It would be nice for the next person who needs help with this if you posted your solutions. :)

Maybe you are looking for