Content-Disposition inline Not working

Hi all,
I am using Orion application server as Web server. I like to open a file in client side form the server. Which one is known MIME type. I don't want the IE to prompt the user for Save as/ Open from the current location.
I am using "inline" argument in Content-Disposition header. Eventhough i am getting promt dialog box in client side.
The following is my code.
<%@ page import="java.io.*" %>
<%@ page import="java.net.*" %>
<% response.setContentType("application/pdf"); %>
<% response.setHeader("Content-Disposition" , "inline;filename=test.pdf" ); %>
<%
String fileURL = "http://java1/examples/jsp/test.pdf";
     ServletOutputStream sout = response.getOutputStream ();
     URL url = new URL ( fileURL );
     BufferedInputStream bis = null;
     BufferedOutputStream bos = null;
     try {
          URLConnection conn = url.openConnection();
          // Use Buffered Stream for reading/writing.
          bis = new BufferedInputStream(conn.getInputStream());
          bos = new BufferedOutputStream(sout);
          byte[] buff = new byte[2048];
          int bytesRead;
          // Simple read/write loop.
          while(-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
               bos.write(buff, 0, bytesRead);
     catch(Exception ex){
          System.out.println(ex.toString());
%>
Any one give the soloution for this problem. I hope there is no problem with the source code. I want to avoid the dialog box while downloading in the client side.
Thanks
Prabhu.

Hi,
Please let me know in which browser you are trying to do this, since it as some problem with IE5. You can try this, using the Netscape browser which doesn't have any problem.
Hope this helps.
Senthil Babu J

Similar Messages

  • SetHeader("Content-disposition ) does not work in NN

    response.setHeader("Content-disposition", "attachment; filename="+ fileName + strExt);
    works for IE 5.5 but not in netscape .
    IE 5.5 shows the save as dialog box
    NN4.79 display the contents
    how can i get the save as dialog box in NN4.79

    try adding response.setContentType("your_content_type...") just before calling response.setHeader("Content-disposition", ...).
    It seems that netscape requires it.

  • Content-Disposition inline/attachment

    I am using Content-Disposition for excel file download as below:
    I have searched the forum but not able to get the exact answer or solution. Please also guide me to some url if possible.
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "inline; filename=xyz.xls" );
    If I am using inline attribute but I am not able to specify the filename as xyz.xls and by default fileName provided by browser is the request URL(action-mapping in case of struts).
    But it works fine with attachment attribute and prompts for the exact file Name and works fine.
    I want to know how to specify the desired fileName with inline Attribute ? I am using the struts based request for Excel file generation.
    Best Regards,
    Amber Gupta

    if You dont't mind , I just want to tell u something on this code.
    If im wrong, Please tell me why? and what is the best way of acheiving it then,
    the code below loads whole filedata and it does not matter how big the file is. Don't you think that it will heat up the memory by doing so. and consider the method what he was doing is perfectly right. but is there any other solution/wrong with above code what MR/ms/Mrs Kenneth has written like.
    I just wanted to know the answer what is the wrong with MR. Kennth Code since i looked at it as a perfect working code(but with some glicth).
    with Regards
    Lokesh T.c
    FileInputStream in = new FileInputStream(fileToDownload);
    ServletOutputStream out = response.getOutputStream();
    int bytesRead = 0;
    byte byteArray[] = new byte[fileTODownload.length()];
    // Read in bytes through file stream, and write out through servlet stream
    /*while( ( bytesRead = in.read( byteArray ) ) != -1 ) {
    out.write( byteArray, 0, bytesRead );
    in.read(bytesArray,0,fileTODownload.length());
    out.write(bytesArray,0,fileTODownload.length());
    in.close();
    out.flush();
    out.close();

  • EmailReceiver QPAC doesn't retrieve 'content-disposition: inline' attachments

    Hi,
    [Note: this is kind of a follow-up thread for
    Email receiver QPAC does not retrieve attachments other than .jar. Thought, I better post a new thread.]
    I experimented quite a lot with the Email Receiver QPAC. Regarding my testing, it seems as though it doesn't recognize attachments from emails, whose
    content-disposition is set to 'inline'. In fact, if I set the content-disposition to 'attachment', then the same attachment in the same Email sent via the same Email server is retrieved.
    Does anyone experienced this as well?
    Does the EmailReceiver QPAC actually retrieve 'content-disposition: inline' attachments?

    Hi Howard,
    thank you for providing the new version!
    We'll contact support then. Since some popular email clients like Thunderbird are set to 'content-disposition: inline' by default but we don't want our users having to adjust their client settings rather trickily, it's pretty important to us that the EmailReceiver actually handles inline attachments.
    Regards,
    Steve

  • I have Cisco TelePresence SX10 and content sharing is not working when I am dialing through the bridge

    I have Cisco TelePresence SX10 and content sharing is not working when I am dialing through the bridge, I can share the content if I drag and drop from RMX, but if schedule the call in Resource manager or manually dial in from device the content is not going to other hand, I have tried to turn off encryption as well but still same issue. can you please help me out with this. I am from Lion co and purchased sx 10 recently.
    regards
    Hemang

    Can you please provide us with a little more information on your systems and configuration / topology, such as, what call control are you using (Cisco VCS, CUCM, other?). what type of "Bridge" are you using (is this a Cisco MCU, or Cisco TelePresence Server, or other device?), what versions of the software are on each of the devices, etc.  The more information we have about your environment will help us assist you better.  But saying that, if all your core equipment isn't Cisco, you may have more luck in the forums for the manufacturer of such equipment (ie Polycom's Support Community).
    Wayne
    Please remember to rate responses and to mark your question as answered if appropriate.

  • Content panel does not work in Online Help file

    Using Robohelp 10: When the help file is opened from application, the correct help page is shown on the right hand side but in the Contents panel the Title page item is selected. The content panel does not work.

    Hi
    I think you have not enabled the Folders_g component on UCM .
    Enable the component from Administration - Admin Server - Component Manager and then restart UCM server .
    Then test to see if the issue still persists .
    Thanks
    Srinath

  • MySite – My Content Page is not working and giving error for existing customers

    We are using SharePoint 2010 and recently moved to SharePoint 2013. Central Admin run under SP 2013 and Content Db Front End run under SP 2010.
    After migration the MySite – My Content Page is not working and giving error for existing customers (http://mysite.ss.com/_layouts/MySite.aspx?Error=4705).
    New users (after migration) are able access the My Content and adding documents but old users can’t.
    Can anyone help me on the above?

    I think you might be using non claims web app in 2010, if that is the case, you 'd need to convert your existing users to claims users for which you can refer to http://technet.microsoft.com/en-us/library/gg251985(v=office.15).aspx
    to check if your exisiting users are claims or classic users , try 
    get-spuser -web http://mysite.ss.com -limit all
    check in the output if you see the claims GUID in form of user names like i:0#.w|domain\username, if yes, they claims users if you just see Domain\username, you want those users to be converted to calims.
    i'd need more details to be specific about my answer but aforementioned scenario is most common of all, hope this helps, 
    Thanks, Noddy

  • Parental Controls Content Restrictions do not work correctly in iTunes?

    I cannot seem to get the content restrictions to fully work in the iTunes Store. The Content Restrictions state that I will not be able to preview, purchase or subscribe to content that is marked as explicit:
    But after setting the Applications level to 4+ and making sure the "Restrict explicit content" box is checked:
    I am still able to view apps for a 17+ audience. The "Entertainment" section of the App Store is filled with applications that feature sexually graphic content (i.e. pictures of nude women in suggestive positions.) The settings do stop me from purchasing the apps. The "Buy App/Get App" button is grayed out so I cannot get the app, but I am still able to preview the app, including screen shots of graphic content along with detailed descriptions.
    Is there a step that I missed? How do I make the 17+ apps not visible? I do not want to disable the entire App store, just the explicit content.
    Thanks!

    I do not understand why APPLE is making it Rocket Science to protect our kids from this por-nography through their Store.
    I have been in a dialgue with APPLE now for 2 weeks about the APP's that continue to come up, and researching further their podcasts also. They continue, as recommended here, to suggest that you complain to the a feedback link that, unfortunately, ends with a thank you and we will not be contacting you personally about this.
    My suggestion is that you go to one of their 24 hour response links, here is one! (http://www.apple.com/support/itunes/contact.html?form=app_store&topic=App%20Stor e&subtopic=Downloading%20and%20updating%20Applications) and complain there. It is their respondsibility to manage their content.
    The other suggestion is to notify everyone you know of your issue with APPLE and encourage them to also notify APPLE!
    Everyone that I have notified is equally dissatisfied with APPLE.
    Shame, we have to go so far to get APPLE to do what's right!

  • Content Search is not Working

    Hi,
    I have uploaded few files( text and word documents) through OCS UI. When I try to search for documents using Content, noting is returning. I dont know why this is not working.
    I want to search of all documents which has content serial# xxxx. I am uploading all these documents into a library with library administrator role.
    Please advise

    Can you search on file names and its only content search that is broken?
    How long did you wait after uploading the files before doing the search?
    I've had the case where the content indexer database job had gotten stuck because of some oversize content. You can make sure that the indexing job is still scheduled by logging into the content schema of your OCS database and executing the following:
    select job, next_date, next_sec, last_date, last_sec, failures, broken, what from user_jobs;
    This should return three entries, one of them will have IFS_TEXT in the what column. Check the next_date, next_sec and last_date, last_sec columns to see when it last ran and when it will next run. if those times are within 5 minutes of the current time, the index job is running correctly. Also check failures to see if the job has recorded any failures. If the Broken column says Y, the job has had a serious failure and you'll need to open an SR to get the job running again.
    In my case, it quit running because a document to be indexed was larger than the could be handled (about 100MB text file), it failed several times and eventually the job went into the broken state. I worked with support to get the file out of the indexing queue and the job restarted.

  • New content for cutout not working

    I'm using Illustrator CS2, and last year I created a silkscreen master for a DVD label that included a big shape with other shapes (text and logos) cut out of it.  It was apparently made using the compound path method (I am aware that there are multiple ways to do this, but I found a compound path in the file, so that must have been the method I used.)  Now I need to change the product number and such.  So the first thing I did was to undo the compound path (sorry, I don't know the exact word in English, as I'm using the Japanese version of Illustrator, but something like "Release Compound Path" on the right-click menu).  I was left with the large path and a bunch of little paths of the various things that were cut out - some were in groups and others weren't, but I couldn't see any discernable pattern as to why the groups were the way they were (and I have since then removed all the groupings, but the symptoms don't change).  In the layer palette it seems like all the paths, including the inside and outside paths of letters like O and D, are all just paths, all the same color as the background shape.   But it works - I can make the compound path again and it looks right, with, for example, the inside of a zero opaque while the outside is transparent.  Somehow it knows what shapes need to be in and what ones need to be out.  I assumed it knew simply by location - e.g. concentric circles would alternate between transparent and opaque.
    But... it's not working on anything new that is added.  To make my changes, I deleted the old text outlines, made the new text, and turned it into outlines.  Then I selected it along with the rest of the stuff and selected "Create Compound Path".  But for some reason it's not "cutting out" anything new.  The new paths get incorporated into the compound path in the Layer palette, and their color becomes the same as the big shape, but transparent areas appear only where the pre-existing paths are, not the new ones.  What could be special about the old paths vs. the new ones?  I'm probably just missing a simple step in the process, but I've looked through various tutorials on this, and as far as I can tell I'm doing it correctly.
    I can send the file if someone wants to look at it.

    It took me a bit to find something called Pathfinder (I was looking on menus, but it was a little palette I needed to reveal), but once I figured it out, it worked like a charm - thanks!  That must have been what I did last year, and then it remembered what was a "minus" and what was a "plus" in the old content.
    No, I do not know the difference between a compound path and a compound shape - in fact, I don't know the difference between a path and a shape.  But it seemed to previously work find as a path, so I pressed Alt to keep it that way.  If it works, don't fix it!

  • Options-content- exceptions is NOT working. I put a website on exception list but doesn't work

    I go to : Tools, options, content. it has on top: Load images automatically . it has a button: exceptions. I enter a web site there so it will NOT load images automatically- does NOT work.
    OR I un-click the load images automatically which makes ALL websites not load images. I then go to exceptions and put a website so it WILL load images from that specific web site - does NOT work.
    When I put the website in exceptions it goes/gets saved to the list of exceptions- but firefox ignores it and does not make an exception for that website. (Also mostly after sometime that I close firefox the list would get cleared by itself)

    You need to make an exception for the server that stores the images. Some websites store their images on a separate server for load balancing or other reasons. You can check the images in Tools > Page Info > Media to see which sites you need to unlock.

  • Clone, spot healing tool, content aware will not work on 11 or 12

    The following tools will not work on PSE 11 or 12: clone, spot healing, content aware. Using 3 yr old iMac with latest OS. Same problem on Mac Book. I must be something wrong.

    I'm not sure what was going on. I eneded up discarding the photo I was working on and open up another one and everything worked. I guess just a little hitch in it's gitty-up!
    Thanks for your comments.

  • Associate Form Design in Content Services ES2 not working

    The Associate Form Design feature in Content Servies ES2 is not working.  I am using a LiveCycle PDF with an embedded XSD schema.  The only error message I get is: Failed to retrieve form design fields from the document.  Does this feature really work?
    Thanks,
    Toni

    Hi Toni,
    The feature does work and has been QE'ed well. Can you attach the error logs and server environment details (appserver etc) so that the team can have a look.

  • Portal content translation is not working in my portal

    HI,
       When i created translation text and released  it is not working according to the target language .
    I'm using EP 7.O sp11
    Is there any problem with this package  ,help me plz
    regards ,
    santhosh

    Hi
    Make sure that you have select your target language in browser
    In the  browser go to the tools general > Languages and select your language
    Thanks and Regards,
    Arun

  • Link to content submission is not working

    I am unable to access the article submission link.  Following is the path that I am trying
    Clicked on "How to Contribute" link at the top of SDN home page.  Scrolled down to the section "ARTICLES, TUTORIALS, WHITE PAPERS AND RICH MEDIA" and then clicked on the link "Content Submission System".  But every time I clicked on this link I got the following error message.
    The webpage at https://sdnweb.sdn.sap.com/sdncss/SubmitterInfo.htm might be temporarily down or it may have moved permanently to a new web address.
    Can someone provide me with the link to submit articles?  Thank you!

    Hi,
    i am trying this since 3 days , but the page does not seem to work, What is the OS? Have you tried to download from the different machine and/or using a different browser?
    where can i contact to get this to work or if someone knows an alternate link?Check e-Delivery website.
    Oracle® E-Delivery Web site
    http://edelivery.oracle.com/
    Thanks,
    Hussein

Maybe you are looking for