How to show/print waiting message when system is serving pdf to browser

Hi,
does anybody know how to print/show "please wait for your request to be completed..." message when they try to click GeneratePdf button for example
they way i do serving pdf to the browser is as below
response.reset();
response.setContentLength(contentLength);
response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline; filename=\""System.currentTimeMillis()+".pdf"+ "\"");
output = new BufferedOutputStream(response.getOutputStream());
while (contentLength-- > 0) {
output.write(input.read());
output.flush();and this is what was written in my popup jsp ( when user click GeneratePdf , the application will process it and at the end serve pdf file to the user using popup window )
<body> <h1>Please Wait for your request to be completed...........</h1> </body> </html>
<%
boolean redirect=false;
try{
PdfDispatcher.dispatchApplication(response,session);
}catch(Throwable t){
System.out.println("Application Dispatcher Exception ... "+t.getMessage());
System.out.println("Continue as per normal....");
redirect = true; // will redirect to other jsp output
if(redirect){
//go to other jsp
}The problem is my message above never got printed to the page ( i guess because the browser thinks that the response has not been completed )
by the time the response has been completed the whole page will be cover in pdf document
The reason i want to do this because my user complaining that they see blank page for long time when the system is slow to generate/server pdf to them.
and it would be better to show some "waiting message" when the system is processing the application and server pdf at the end of the operations.
anybody know how to workaround this?
Thanks

just_a_kid83 wrote:
does anybody know how to print/show "please wait for your request to be completed..." message when they try to click GeneratePdf button for exampleUse JavaScript+DOM. Add a <div> somewhere in the page where the message should be displayed and put the message and an animated 'loading' gif in it. Hide the <div> using the CSS 'display' property which is set to 'none'. Then add an onclick event to the button/link which downloads the PDF file which gets the <div> element by its ID and set its 'display' property to 'block'.

Similar Messages

  • HT4623 I have an ipad mini.  When I tried to update my apps many of them have been showing a "waiting" message for two days and I cannot open the app or delete the app.  Any ideas?

    I have an ipad mini.  I did an app update and now many of them have been showing a "waiting" message for two days and I cannot open the app or
    delete the app.  Any ideas?

    Double tap the Home button to bring up the multi-tasking bar...tap & hold any app until they all start to wiggle...tap the red minus sign to remove every app shown. Tap the Home button when finished. Try to delete the app now.

  • How to show custom error message in WebADI Excel template?

    Hi,
    I've  created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
    WebADI Interface API Returns is set to  "Error Message".
    I'm using  raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL  is not populated on the excel template.
    Instead it is showing "SQL exception occurred during PL/SQL upload".
    Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
    TIA
    Narasimha

    The custom API errors are visible in the BNE log but not on the Excel.
    BNE Log=>
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API.  Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
      at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
      at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
      at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
      at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
      at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING        BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR          BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection.  There may be transaction problems.
    How to show the same error in the excel template?
    Here is the package:
    CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
    AS
       PROCEDURE upload_data (
                              P_CONTAINER_ID IN VARCHAR2
                            , P_SAIL_DATE IN DATE
                            , P_PO_NO IN VARCHAR2                     
                             ) IS
        --declare
        lv_err_msg      VARCHAR2(240);
        lf_err_flag     NUMBER := 0;
        ln_temp         NUMBER;
        BEGIN
        --------------------- checking for mandatory parameters---------------------------
          IF (P_CONTAINER_ID IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
          END IF;
          -------------Validation for Sail Date Format----------------------
          IF (P_SAIL_DATE IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
          ELSE
             BEGIN
                SELECT 1
                  INTO ln_temp
                  FROM DUAL
                 WHERE P_SAIL_DATE =  TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
             END;
          END IF;
          -------------Validation for PO_Number----------------------
          IF (P_PO_NO IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
          ELSE
             BEGIN
                SELECT count(1)
                  INTO ln_temp
                  FROM PO_HEADERS
                 WHERE Attribute4 =  P_PO_NO;
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
             END;
          END IF;
         -----------------------Insert Record----------------------------
         IF lv_err_msg is NULL THEN
         BEGIN
             INSERT
              INTO XXP2P_HW_COST_FACTORS_STG
                     CONTAINER_ID
                    ,SAIL_DATE
                    ,PO_NO
                    , ERROR_FLAG
                    , ERROR_MSG
                   ,CREATED_BY
                    ,CREATION_DATE
                    ,LAST_UPDATED_BY
                    ,LAST_UPDATE_DATE
                    ,LAST_UPDATE_LOGIN              
                VALUES
                     P_CONTAINER_ID
                    ,P_SAIL_DATE
                    ,P_PO_NO              
                    ,lf_err_flag
                    ,lv_err_msg
                  ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.LOGIN_ID              
                  --  commit;
                  DBMS_OUTPUT.put_line
                    '-' || 'After ap_invoices_interface'
            EXCEPTION
            WHEN OTHERS THEN
              ROLLBACK;
              lf_err_flag := 1;
              lv_err_msg  := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
              raise_application_error(-20001, lv_err_msg);
            END;
        ELSE
              raise_application_error(-20001, lv_err_msg);
        END IF;
      END upload_data;                        
    END XXPO_COSTFACTS_WEBADI_PKG;

  • How to show a error message to user from report.

    I don´t wanna to go in a form builder to create a simple form for just two inputs.
    I have put two inputs into reports parameter screen, but I know that reports is not like forms, I cannot use SET_ITEM_PROPERTY to hide an element or put a runtime message to a label.
    How can I show an error message when I validate an input from user, when some input trigger raise?
    Thanks a lot!

    The SRW.message doesn't show me no alert on report 10g !!!
    is there any restriction that can be made to block the displaying of the alert on the web environnement?
    thanks..

  • How can i print text messages from my htc amaze to my deskjet 3050A

    how can i print text messages from my htc amaze to my hp deskjet 3050A

    Hi,
    I believe the phone uses Android OS, v2.3.4 (Gingerbread) therefore you can use one of these applications:
       http://www.printeron.com/apps/androidprinting.html
       https://market.android.com/details?id=com.pauloslf​.cloudprint&hl=en
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How can i print text message from my iPhone?

    I have an iPhone 5S.  How can I print text messages to save those conversations?

    Did you try to copy and paste the content into another app, like notes or Mail and then send it to the printer?

  • Please wait message when opening form created by Adobe LiveCycle Designer ES 9.0

    Problem
    Please wait message when opening form created by Adobe LiveCycle Designer ES 9.0
    Full message
    Please wait... If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to display this type of document. You can upgrade to the latest version of Adobe Reader for Windows®, Mac, or Linux® by visiting  http://www.adobe.com/products/acrobat/readstep2.html. For more assistance with Adobe Reader visit  http://www.adobe.com/support/products/ acrreader.html. Windows is either a registered trademark or a trademark of Microsoft Corporation in the United States and/or other countries. Mac is a trademark of Apple Inc., registered in the United States and other countries. Linux is the registered trademark of Linus Torvalds in the U.S
    Actions
    Updated Windows RT 8 to 8.1
    Uninstaled Adobe Reader Touch 1.3 and instaled 2.0 Build 84770
    Additional Information
    The form was created 10 or 11 months ago, and we are pretty sure that we were able to open it a while back
    The same PDF file opens just fine in Windows 8.1 using Adober Reader XI 11,0.06, it is only the app that is affected.
    The document cannot be opened by any other mobile app that we have tried or on another mobile OS (iOS)
    Any ideas?
    Thanks & Regards
    Jim

    The user's assertion is surprising to me, but perhaps I'm missing something important. I thought the correct position was from the conclusion of my earlier post "it can't be done". Adobe state their Reader Touch doesn't support XFA (http://blogs.adobe.com/readermobile/2012/12/13/adobe-reader-for-windows-8-tablets/). Unless (see that blog entry) you changed the type of form.

  • How to show a success message in a dialogue at the top of the page

    Hi,
    Can someone please tell me how to show the dialogue message at the top of the page on successfully inserting a record in the database. Current I have 2 pages from first page user navigates to the second page where the information entered on the page is saved in the database on successful commit I am forwarding back to the first page where I need to show a message a record saved successfully. Can someone tell me how to do that. Currently in my second page I have the following
    OAException confirmMessage = new OAException("Record has been added successfully.",
                                                           OAException.CONFIRMATION);
              pageContext.putDialogMessage(confirmMessage);
              pageContext.forwardImmediately("OA.jsp?page=<back_to_first_page>",
                                  null,
                                  OAWebBeanConstants.KEEP_MENU_CONTEXT,
                                  null,
                                  null,
                                  true, // Retain AM
                                  OAWebBeanConstants.ADD_BREAD_CRUMB_NO);but I don't see a message at the top of the first page. Any help is appreciated.
    Thanks

    Hi guru,
    forwardImmediately or setForwardURL would not swallow any messages.
    The folllowing code works in create page of toolbox tutorials.
    MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName),
    new MessageToken("EMP_NUMBER", employeeNum) };
    OAException confirmMessage = new OAException("AK", "FWK_TBX_T_EMP_CREATE_CONFIRM", tokens,
    OAException.CONFIRMATION, null);
    pageContext.putDialogMessage(confirmMessage);
    pageContext.forwardImmediately("OA.jsp?page=/<yourname>/oracle/apps/ak/employee/webui/EmpSearchPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How do I save "Sent" messages when sending from the ipad

    How do I save "Sent" messages when sending from the ipad2?

    By default sent items should be saved in your Sent folder. For IMAP type accounts you should be able to change that by selecting the account in Settings > Mail, Contacts, Calendars , then selecting 'Account' on the popup for it and then 'Advanced' at the bottom of the next popup

  • How can I remove unread messages when I know I don't have any?

    How can I remove "unread messages" when I know I do not have any?

    Hit the num lock button again. Num lock forces only the numeric keypad underlying keys to work as a  numeric keypad, and the rest of the keyboard won't work.  Unfortunately Apple stopped including the numeric keypad hidden keyboard key labels on its keyboards.  They used to include them.  They are known as mouse keys: http://docs.info.apple.com/article.html?path=Mac/10.5/en/cdb_moskys.html

  • Keep getting "loading/waiting" message when I try to download or update anything on my iPad.  I have tried signing out and in.  Turning iPad off and on, left it off overnight, and spoken with iPad support, nothing.  Any help out there?

    Keep getting a "loading/waiting" message when I try to download/update anything.  Sometimes something will download.  I have signed out and turned the thing off and back on, signed in and no help.  I have did the sleep button and home button thing, no help.  I have talked to iPad support and so far, no help.  Any ideas out there?

    If there are multiple apps trying to download at once, only one can download at a time and the rest say "Waiting" until it is then their turn. Try this. Double tap the icon of the Waiting app, and it should resume the download.
    If that doesn't work:
    •  Log out of your iTunes store account.  Go to Settings > Store > Sign Out Then press the Home button.
    • Then press and hold the Home and Sleep buttons simultaneously and don't release them when it brings up the Turn Off screen; keep holding them until the Apple logo appears.
    • After restart, the Waiting should be gone.
     Cheers, Tom

  • I'm getting a "printer error" message when I try to print a document with a lot of scans in it. Any suggestions?

    I'm getting a "printer error" message when I try to print a document with a lot of scans in it. Any suggestions?

    OK, I tried a few things, and I do not understand the results.
    1) I opened the document in Preview, and it would only recognize the three initial pages which I typed using the Pages App. It did not recognize the bulk of the text which I copied from Appleworks 6. It also did not recognize any of the scans.
    2) I tried opening a pdf in Preview, and it would only recognize the scans. (No Text!)
    3) I tried copying everything (select all, and command-c) in Pages, and then opened a blank Pages doc, and typed Command-v. This got me all of the text, but none of the scans!
    4) I was worried that my Pages app might be corrupted, but I successfully converted a similar 78-page document with copied materials from Appleworks 6 and similar scans, ant this worked perfectly.
    My conclusion is that my file must be corrupted. Is there any way to check this? shabda88

  • [svn] 3459: Fix FB-14050: Watchpoints: Debugger stack does not always show correct 'Suspended' message when at a Watchpoint.

    Revision: 3459
    Author: [email protected]
    Date: 2008-10-02 14:09:16 -0700 (Thu, 02 Oct 2008)
    Log Message:
    Fix FB-14050: Watchpoints: Debugger stack does not always show correct 'Suspended' message when at a Watchpoint.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/FB-14050
    Modified Paths:
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/DManager.java
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/DProtocol.java
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/PlayerSession.java

    Hi Experts,
    After i tried a few times, i can successfully start prepare with upgrade asistant monitor - Administrator >> Start Prepare,
    Thanks

  • How to Customize the Error Message when a user enters a wrong password

    Hi Gurus
    Pls Help out me that
    How to Customize the Error Message when a user enters a  wrong password ?
    I need the Help to Customize the messege ?
    How  we can do
    Pls Tell me indetail

    Firstly many appologies I have given you slightly duff information here, I had been editing the file above for email notification texts not logon / password texts.
    The file you need is actually a portal .par file and can be found in the deployment/pcd directory.  The file you need is called com.sap.portal.runtime.logon.par (with a .bak extension at this time). 
    You need to copy this file to a local machine and unzip the contents.  The files you need to edit are contained in a further jar file which can be found in the \PORTAL-INF\lib directory - it is called umelogonbase.jar.  It too needs to be extracted and the file you need to edit is logonMessages_xx.properties (where the xx is the language code you are using).
    In this file you will find lines like:
    NUMERIC_REQUIRED=Invalid new password (must contain digits)
    You need to identify which texts you wish to modify and edit the text to the right of the equals sign.  Once complete rezip the umelogonbase.jar file and then the com.sap.portal.runtime.logon.par (this time name it without the .bak extension.  Then logon to the portal and upload the new par and you should see your new logon messages.
    Haydn

  • How do you disable i messaging when switching to a non iphone?

    How do you disable i messaging when switching to a non iphone?

    Nope, that doesn't actually do the trick.  It might keep i messages from going to your i phone but still won't allow them to go to your new device. 

Maybe you are looking for

  • Saving photos with Time Machine

    I want to be able to delete a lot of old photos from my computer after backing them up with Time Machine onto an external hard drive. I want to keep all of my old photos permanently on the external hard drive that I use when backing up. If Time Machi

  • N80 works in the States but not Europe

    I purchased an N80 in the States and it worked with my T-Mobile SIM but then I moved to Cyprus. I got a Vodafone SIM and now the N80 will not connect to the network. The new SIM works with a different phone so I know that is not the problem. Any idea

  • File Explorer run as administrator

    I have windows 8.1 PRO and I am trying to change the target file under file explorer. It will not allow me ( grwed out) I need to run file explorer as administrator in order to make changes.  I tried all the registry edit  listed on this forum and no

  • Same subject, new question

    I posted this earlier and have been trying to figure it out but can't, so I tried another way and it almost works, but not quiet. I have a table with 31 rows and I use the following to generate checkboxes, three columns across with 10 in each column,

  • SD Cond. type changes from non statistic to statistic when creating invoice

    Hi gurus!, I have a problem with a condition type. Though I set it as NON statistic at the procedure, once I create the sales order it's ok but when I create the invoice from the delivery, then the same condition type appears as statistic. Do you kno