Display PDF on the browser from BLOB column

Hi All,
I have BLOB column in the table where we are storing PDFs.
I want to display PDF within the browser ( not as a download option) from that BLOB column, like clicking on the "Print" link.
Please let me know if anyone has any suggestion.
-Smith

Create this DB procedure:
procedure show_webdoc(io_blob    in out nocopy blob
                     ,i_mimetype in varchar2
                     ,i_filename in varchar2)
is
begin
   if dbms_lob.getlength(io_blob) >0 then
      owa_util.mime_header(nvl(i_mimetype,'application/octet'),false);
      htp.p('Content-length: ' || dbms_lob.getlength(io_blob));
      htp.p('Content-Disposition:  inline; filename="'||i_filename|| '"');
      owa_util.http_header_close;
      wpg_docload.download_file(io_blob);
   end if;
end;Get the blob and give it as input to this procedure. For a pdf the mime type will be application/pdf.

Similar Messages

  • I have set the CustWiz/MST to 'Disable and Lock' the ability to display PDFs in the browser.  We wan

    I have set the CustWiz/MST to  'Disable and Lock' the ability to display PDFs in the browser.  We want  them to open separately in Acrobat.  After I deploy, the setting IS  disabled and locked, but when you click a PDF in the browser, it STILL  opens in the browser, and not in Acrobat.
    I am pushing  Acrobat onto machines that already have Acrobat Standard 9 installed  with the same settings.  It worked properly then.
    What is causing this setting to be ignored?  How can I fix it?  It's delaying my deployment.
    I have to deploy Acrobat 9 due to the bug I discovered here:
    http://forums.adobe.com/thread/865843
    (With many other frustrating responses).
    This is getting a little irritating...
    Thanks for any input!
    Acrobat Standard X
    XP SP3
    Firefox 5

    Thank you for the answer about updating the Foxit plugin. Firefox tags the Foxit plugin as potentially unstable, so it turns out I had another program killing the plugin's startup process so it was always disabled in firefox. I reenabled its startup process and updated the plugin. To get firefox to use it as the main pdf reader I went to options>applications and changed the option for pdf to the foxit plugin and everything works dandy now! Thanks again!

  • Reading the data from BLOB column

    HI,
    I have a table with following structure
    Test_Mail(Attachment BLOB,Attachmentname varchar2(255),FileSize number)
    The data in the table is like
    Attachment|Attachmentname|FileSize
    BLOB|test.txt|1236
    I wants to read the data from the BLOB attachment in to new file.
    can any one help me in doing this with plsql??
    Thanks in advance,
    Balaji tk.
    Edited by: Balaji.tk on Jan 9, 2011 9:28 PM

    May be something like this ?
    DECLARE
       l_file       UTL_FILE.FILE_TYPE;
       l_buffer     RAW (32767);
       l_amount     BINARY_INTEGER     := 32767;
       l_pos        INTEGER            := 1;
       l_blob       BLOB;
       l_blob_len   INTEGER;
    BEGIN
    -- Open the destination file.
       l_file := UTL_FILE.FOPEN ('TEST_DIR', v_attachment_name, 'wb');
       --This v_attachment_name can be selected from your table.
    -- Get LOB locator
    FOR rec IN (
    SELECT attachment   l_blob
          FROM test_mail
         --Your where condition to find the row.      
       --AND ROWNUM =1
    LOOP
       l_blob_len := DBMS_LOB.getlength (rec.l_blob);
    -- Read chunks of the BLOB and write them to the file
    -- until complete.
       WHILE l_pos < l_blob_len
       LOOP
          DBMS_LOB.READ (rec.l_blob, l_amount, l_pos, l_buffer);
          UTL_FILE.put_raw (l_file, l_buffer, FALSE);
          l_pos := l_pos + l_amount;
       END LOOP;
      commit;
    END LOOP;
    -- Close the file.
       UTL_FILE.FCLOSE (l_file);
    EXCEPTION
       WHEN OTHERS
       THEN
    -- Close the file if something goes wrong.
          IF UTL_FILE.IS_OPEN (l_file)
          THEN
             UTL_FILE.FCLOSE (l_file);
          END IF;
          RAISE;
    END;

  • Incorrect PDF being displayed periodically in the browser

    I want to start by thanking anyone who could shed light on this problem. 
    We have a web application that dynamically generates PDF files per a user request in a web application.  98% of the time the proper PDF gets opened in the browser correctly, whether it be IE or Firefox.  The other 2% of the time, no matter what url data was requested from, an incorrect PDF is displayed.  This incorrect PDF that gets displayed is one that was requested and opened in a previous request and could still be open in a browser tab.  Once this state is reached all PDFs that are requested do not line up with the requested PDF, meaning they are all incorrect.  Once the browser is refreshed the problem stops happening for another stretch of time. 
    I have read posts that discuss placing a random number in the url to "trick" the browser plugin from thinking it already has the PDF.  We have done that.  In fact this issue appears to not be impacted at all by the url.  For example, when this problem happens I can go to https://appname/one/pdf and get the PDF that was requested and sent back when I went to https://appname/two/pdf.  These are two clearly different urls even without the random number that we placed on the end as a parameter and I still receive the PDF from the second URL. 
    We debugged the server side code and we are 100% sure that we are sending the correct PDF back to the client by streaming the PDF to a file on the server prior to sending it back to the client. 
    One thing I have noticed is that currently we are not specifying the Content-Disposition header when we return the PDF to the browser.  This means that there is no filename being provided to the front end and the plugin.  Is it possible that the Adobe Reader plugin eventually gets confused as to what file to display if there is no specific file name provided for the PDF from the server, with the keyword there being eventually as it is an intermittent problem? 
    We can easily set the Content-Disposition header to be attachment; filename="somename.pdf" but given the intermittent nature of this bug we would like to get some feedback as to if this fix is logical given this issue.  If it is not logical we would appreciate any other information that may help us troubleshoot this issue.  The alternative is to rewrite the document generation code to output HTML, and I really do not want to do that. 
    We are using the Adobe Acrobat 9.4.5.236 add-on to Firefox 10.0.3, Adobe Reader 9.4.0, and Internet Explorer 8.0.6001.18702.  All of these versions are not able to be upgraded, meaning this is the baseline we have to support.  We also operate, still, on Window XP Professional Service Pack 3. 
    One last comment, client side operations by the user are not valid solutions either.  I have already suggested asking the user to uncheck the open in browser option in Adobe Reader but our customer does not find that to be a valid solution.  To date we have not been able to recreate the issue when the PDF is opened in Adobe Reader proper and not the browser. 
    Thanks again for any help and information. 

    In case someone, other than me, stumbles across this post.  The solution I suggested in the opening post did not work.  When a user opens a PDF using the Reader Plug-in in Firefox they still have the potential to see the previous PDF.  The interesting thing is, as it appears right now, that this only occurs when a user closes a Firefox tab that contained the previous PDF and then triggers a different PDF to be opened in Firefox.  What seems to be happening is that the Reader Plug-in ignores the file it is supposed to open and recycles the PDF that was in that tab before it was closed.  Which is funny because the URL of that tab points to the new file that was downloaded into the temp directory but the contents of the tab is still the previous PDF.  Not sure if the plug-in just doesn't clean out the previous contents or what but it clearly is an issue that resides in the Adobe Reader Plug-in for Firefox. 
    I am not sure what we are going to do at the moment but if we find a solution, other than don't open the PDF in Firefox, I will be sure to post it here.  However, for right now there is nothing coming to mind. 

  • LifeCycle Form Server :- My form is rendering as pdf in the browser  without displaying data sometim

    LifeCycle Form Server :- My form is rendering as pdf in the browser without displaying data sometimes within data fields, and at other times it will display data. The form consistently displays data when rendered in HTML.
    We display the forms in a browser either HTML or PDF format based on the user selection. But the behavior of PDF format is not consistent. Sometimes it renders properly and sometimes the form renders without data.
    Dose any one experienced this issue?
    Any help would be greatly appreciated.
    Thanks in advance,
    RK

    I have been seeing the same issue, but haven't been able to find a fix for it yet. So any info would be appreciated here too.
    Thanks

  • How to view PDF files strored in a BLOB column

    Hi all,
    I want to display a PDF file, stored in a BLOB column, in a form or through a JavaBean.
    But the problem is more complicated then that. I do not want to retrieve the PDF file in the application server that show it through a browser.
    Actually, I do not want users to get the entire file, I just want them to see it or print it.
    I want, in fact, to display a "stream" of bytes through Oracle Forms. Not a file.
    This one, sounded to be a good solution, but actually not. When the file was too big (multiple pages), the application was blocked until the entire file was loaded. And when you try to print it, it wasn't printed right. The advantage of this solution is that it is open-source so we can add methods to connect to the DB, retrieve the content of the BLOB column and displays it without downloading the file.
    Here is a good solution. Really good, files are loaded quickly, the rendering is really good and the file is printed perfectly (as it was printed from Adobe Acrobat). The disadvantage of this solution is that it is not open-source and is really expansive.
    As you can see, both solutions uses PJC.
    So any help, any idea to solve my problem will be highly appreciated.
    Thanks to all of you,
    Amine
    PS : I am using F&R 11gR2

    Not entirely. At least we came to the conclusion it doesn't make (much) sense to block the save option of PDFs if you want to allow printing them
    Anyway; there is of course another possibilty: you could always write your own java bean PDF reader; there are plenty of java PDF libraries available:
    Open Source PDF Libraries in Java
    The easiest way would be to choose one which can open a PDF from a URL and render it; I would retrieve the image via mod_plsql using WPG_DOCLOAD and simply use the PDF library to render the PDF. No tempfiles anyway, and if you don't implement it there is also no save button.
    cheers

  • How can I open different binary files from BLOB column ?

    If we store some type of binary file (XLS, DOC, PDF, EML and so on, not only pictures) in BLOB column how can I show the different contents? We use designer and forms 9i with PL/SQL.
    How can I copy the files from BLOB to file in a directory or how can I pass BLOB's content to the proper application directly to open it?

    The mime type is just a string as explained above (e.g. application/pdf...). There are lot of samples here and on metalink.
    E.g. add a column mime_type varchar(30) to your blob table. Create a procedure similar to the following:
    PROCEDURE getblob
    (P_FILE IN VARCHAR2
    IS
    vblob blob;
    vmime_type myblobs.mime_type%type;
    length number;
    begin
         select document, mime_type into vblob,vmime_type from myblobs where docname = p_file;
         length := dbms_lob.getlength(vblob);
         if length = 0 or vblob is null then
         htp.p('Document not available yet.');
         else
         owa_util.mime_header(vmime_type);
         htp.p('Content-Length: ' || dbms_lob.getlength(vblob));
         owa_util.http_header_close;
         wpg_docload.download_file(vblob);                
         end if;
    exception
         when others then
         htp.p(sqlerrm);
    END;
    Create a DAD on your application server (refer to documentation on how to create a DAD).
    Display the blob from forms (e.g. on a when-button-pressed trigger):
    web.show_document('http://myserver:port/DAD/getblob?p_file=myfilename','_blank');
    For storing blobs in a directory on your db server take a look at the dbms_lob package.
    For storing blobs in a directory on your app server take a look at WebUtil available on OTN.
    HTH
    Gerald Krieger

  • How to open report in the browser from PL/SQL procedure

    Hi,
    I need to call the report (with destype = SCREEN) from the PL/SQL procedure and display in the browser.
    For Example: when I call P_call_report procedure in my Forms6i button or at sql*plus, the report output PDF/HTML should open in the Browser window.
    Iam Using IE, report6i, forms 6i, Oracle 8.1.7, Windows OS
    I tried using UTL_HTTP(' ') in a procedure. But when I execute the procedure at sql*plus it says Pl/sql procedure completed successfully message without opening report output in the browser window. If I copy the same url and paste it in the browser, it works.
    Please let me know if there is any solution.
    thanks alot.

    I guess event driven publishing may work. But Iam not sure about the opening of the browser from inside the procedure.

  • Problems displaying PDF files in browser - Help requested

    The scenario is that I visit a website that has information available via a link that normally would open a PDF document in a browser window.  The sort of document, that once open, if I clicked 'File-save as' in the browser would immediately save as a PDF file.  In the current situation I click on the link and all I get that opens is a screen full of random characters from top to bottom.  I have tried right click 'file save as' on the link that would open the PDF in the browser, but all it wants to save is a .PNG file, i.e. http://echa.europa.eu/echa-styled-theme/images/doc_lang/en.png - which is what I get from right click 'properties' on that link which should open the PDF in the brawser - normally I would see a .PDF file described. I therefore can't even download the file to open as a PDF direct from a stored location on my own PC - all it seems to see is the graphics format - this probably why when the browser goes to open the PDF file I get the random characters, i.e. the application is doing its best to translate what it does see.  I would be grateful for some advice.  Pertinant information follows:
    1.  It happens across more websites than just one example that I've quoted.
    2.  It happens on my desktop only - I don't have the problem on 4 other portable computers, including ones running the same O/S
    3.  Desktop is running Windows Home Pro, all updates executed, running the latest version of Acrobat reader with all updates executed - I tried yet another uninstall, reboot, new download, reinstall, reboot etc. yesterday.  Desktop is HP Pavillion with 12GB RAM
    4.  I get the random character display when running IE9 on the desktop, I have also replicated the problem with other versions of IE installed instead.  If I try using Chrome as a browser it goes away and tries and just fails to open the link entirely and reverts to the original page.
    5.  I've already checked online for similar problems and can confirm that all the Adobe plugins are installed per what seems standard advice I have also checked the internet settings in Adobe Acrobat preferences and all seems fine.
    6.  Thing like the browsers and Adobe arobat are running as per their standard set-ups with nothing else done to these.
    7.  Any other PDF files stored on the hard drive of the desktop open in Acrobat reader without problems
    8.  Acrobat reader version is 11.0.06.70
    Any assistance to open the PDF files in the browser and get it working particularly with IE would be great, I am quite IT literate and can try most things.  Many thanks

    Moderator
    I have no idea how to edit the above message, but apparently it has been rejected.  I cannot understand why, I am a regular contributor in many forums and have never suffered the indignity of having had a message rejected before.  The message contains an excellent example of the problems I am having in the following link Vacancies
    How on earth can I demonstrate the problems I am having without being to post an example - that example has both sorts of links on one page, ones I can open and ones I can't - if anyone with technical knowledge is trying to help me then that is just the sort of page that would be useful to help solve the problem.  Rather than the link to the ECHA website in the above posting (which I note was approved).  I struggle with your logic in accepting one message and rejecting the other.  It is difficult enough as a user to describe a problem in words let alone have the best example of the problem rejected without explanation and no right of appeal on the email that I got telling me.  Not happy here!   All I am trying to do is to solve the problem I have

  • How to stop the Browser from caching my web pages

    Hi There
    Can anyone tell how to stop the browser from caching my jsp pages
    I am using
    <%response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0);
    %>
    but this does not work anduser is able to go back to the previous page
    which i dont want and i want the browser to display the message the page has expired
    Help appreciated
    Thanks
    Mumtaz

    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
    I have cut paste the code from my jsp which is working. There is one additional line. I do not know if that is the cause but there is no harm in trying that out.
    Srinivasan Ranganathan

  • Acrobat does not opens a PDF in the Browser at all times

    Required:
    I need to ensure Acrobat opens a PDF in the Browser at all times, and not have Reader hijack the task.  All fixes for this I have found won’t work as they render Reader inoperable. i.e. uninstalling Reader or denying users to the Reader executable AcroRd32.exe
    Situation:
    I have a problem with Adobe Reader and Acrobat Standard 8.2.5.  This is on a Terminal Server 2003 with 10 users.  They require both Acrobat and Reader be accessible due to specific 3rd party applications related to banking software. 
    Problem:
    They must open PDFs in a browser with Acrobat so they may fill the forms and save them.  Acrobat doesn’t consistently open the file; Reader hijacks the file when clicked to open and their ability to fill the forms is hindered. 
    -    Open PDF in browser is checked in Acrobat
    -    Open PDF in browser is NOT checked in Reader
    Sometimes when the Acrobat desktop icon is clicked, Reader opens instead.  Having Acrobat open in the background does help but is not consistent.
    Also uninstalling Reader from the Server is unacceptable due to a 3rd party banking application for loans.  This application is hard coded to open AcroRd32.exe within the application for opening PDFs. 
    Any suggestions would be greatly appreciated.
    Ken

    Try this, when I right clicked on the document to rotate the image a noticed a tool bar appeared at the bottom of the page with the save icon. It then disappeared, but by hovering at near the bottom of the document the tool bar appears and I can save the PDF.

  • Use byte array of PDF to display PDF in IE browser

    I get byte array of PDF as input argument. I need to use byte array to display PDF in IE browser. I am writing code in doGet method of Servlet to accomplish this. However, PDF never gets displayed. I see Acrobat starting, but original PDF never gets displayed in browser.
    I am using code below in doGet of Servlet:
    resp.setContentType("application/pdf");
    resp.setHeader("Expires", "0");
    resp.setHeader("Cache-Control","must-revalidate, post-check=0,
    pre-check=0");
    resp.setHeader("Pragma", "public");
    resp.setHeader("Pragma", "no-cache"); //HTTP 1.0
    resp.setDateHeader("Expires", 0); //prevents caching at the proxy
    server
    resp.setHeader("Cache-Control", "no-cache"); //HTTP 1.1
    resp.setHeader("Cache-Control", "max-age=0");
    resp.setHeader("Content-disposition", "inline; filename=stuff.pdf");
    byte[] inBytes = getBytesOfPDF(...);
    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
    if(inBytes !=null){
    outStream.write(inBytes);
    outStream.flush();
    I added dummy name of PDF (stuff.pdf) for display, as I heard IE requires a file name with .pdf extension for display.
    But I had no luck with the code above.
    Any help with code will be appreciated.
    [email protected]

    Hi
    Am using the same code and i am able to get the PDF out.
              /* Finally writing it into a PDF */
                   response.setContentType("application/pdf");
                   /* filename could be any thing */
                   response.setHeader("Content-Disposition",
                             "attachment; filename=Report.pdf");
                   response.setContentLength(content.length);
                   response.getOutputStream().write(content);
                   response.getOutputStream().flush();
    But this also throws a error in the server :
    java.lang.IllegalStateException: getOutputStream() has already been called for this response
         at org.apache.catalina.connector.Response.getWriter(Response.java:606)
         at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:195)
         at org.springframework.web.servlet.view.freemarker.FreeMarkerView.processTemplate(FreeMarkerView.java:344)
         at org.springframework.web.servlet.view.freemarker.FreeMarkerView.doRender(FreeMarkerView.java:280)
         at org.springframework.web.servlet.view.freemarker.FreeMarkerView.renderMergedTemplateModel(FreeMarkerView.java:225)
         at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:174)
         at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:239)
         at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1142)
         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:879)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:792)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
         at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at org.ca.ielts.presentationtier.servlet.AuthorisationAuthenticationFilter.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Any Clues how this has to be fixed.????

  • Displaying *.pdf file on browser with servlet

    hi all
    this RAMESH,struggling to display a pdf file on browser from a remote mechine
    earlier i tried with servlet
    response.setContentenType("application/pdf")
    out.println();
    by this i am getting only some data as below
    endobj
    4 0 obj
    <<
    /ProcSet [ /PDF /Text /ImageB ]
    /Font << /Fo0 21 0 R /Fo12 24 0 R /Fo13 27 0 R /Fo16 30 0 R /Fo18 33 0 R /Fo19 36 0 R >>
    >>
    endobj
    For this purpose i have gone thru www.lowagie.com
    and gone thru all examples but i am not getting how to display on browser or at least awt frame
    please requesting all for suggest me some way
    tanks all
    -Ramesh

    are you trying to
    a) create a PDF dynamically
    b) send an existing PDF

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How to Open PDF in the browser...JSF

    String strUrl = http://..../xxxxxe43cb072378947fe8c1b7bcc7201691a.pdf
    FacesContext faces = FacesContext.getCurrentInstance();
    ExternalContext context = faces.getExternalContext();
    HttpServletResponse response = (HttpServletResponse)context.getResponse();
    response.sendRedirect(strURl);          Hello,
    I have to open PDF in the browser, I am trying to redirect using the above code, but it is throwing exception as below. Could some one help me in this issue?
    Thanks In advance
    Error Message:
    java.lang.IllegalStateException: Cannot forward after response has been committed
    Error details:
    java.lang.IllegalStateException: Cannot forward after response has been committed
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:313)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
         at com.esri.adf.web.faces.application.ADFViewHandler.renderView(Unknown Source)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at com.esri.adf.web.util.ADFSessionTimeoutFilter.doFilter(Unknown Source)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Unknown Source)

    You cannot send two responses per request. The solution is to let the client create two requests. Common approach is to add an onclick to the commandbutton/commandlink which opens the PDF in a new browser window and let the actual command action invoke a redirect on the current browser window.
    E.g.<h:commandLink value="Download PDF" action="#{myBean.action}" onclick="window.open('http://..../xxxxxe43cb072378947fe8c1b7bcc7201691a.pdf');" />where the #{myBean.action} invokes a redirect and the http://..../xxxxxe43cb072378947fe8c1b7bcc7201691a.pdf opens the PDF in the new window.
    Edit
    I've read your question/problem once more and now I am a bit confused. All you want to do is to open the PDF file in a new window and you don't need to do something in the backing bean? Just use a link with target="_blank".
    <h:outputLink value="http://..../xxxxxe43cb072378947fe8c1b7bcc7201691a.pdf" target="_blank">Download PDF</h:outputLink>No need for a redirect here.
    Edited by: BalusC on Nov 21, 2007 7:21 AM

Maybe you are looking for

  • Airport Base Station No Longer Found in Network

    Since applying the 10.5.2 upgrade yesterday my home network, routed via a cable modem and a formerly dependable original Airport Base Station, is no longer recognized by Airport Utility... and the Airport icon in the finder is continually scanning. I

  • Expand not working ...

    Hi all. I'm developing a simple scenario where I read employee data and later if expanding, I get the absences it has. For this purpose, I've implemented the GET_ENTITY_SET for both entities and made an association between them. I tested them separat

  • How to get internal table with maximum value of a field in other internal

    Let say I have an table itab consisting of: itab-matnr = marm-matnr. itab-umren = marm-umren. itab-ean11 = marm-ean11. there are many "ean11" for one "matnr" How could I create itab2 with only "biggest" "ean11". could you give me examlple

  • Oracle Database 10g Lite -- SYNC Error

    Hi, I am Using Oracle Database 10g Lite.While doing the Sync Process With the Mobile Server i am getting following error message in my Ol_SYNC.log file "SUCCESS",0,"03/09/2009 18:02:36","","New2008" "ERROR",POL-3011,"03/10/2009 12:27:54","a device re

  • Send Auto mail to Vendors for Pending Delivery of Purchase orders

    Hi Gurus, I want to send an Auto Mail to my vendors according to their products as a reminder for the delivery of items of Purchase Order . Please give the configuration changes required for the same Thanks a lot in Advance Sam