How can I forward next page, and then pop-up a download dialog box.

My require is that pop-up a download dialog box after forwarding next page.
I have read the coding in the processFormRequest of current page like below,
but I find out that it only can pop-up a download dialog box,
however, it can't forward the next page.
pageContext.setForwardURL("OA.jsp?page=/oracle/apps/xxfm/fm002/webui/TEST001PG",
null,
OAWebBeanConstants.KEEP_NO_DISPLAY_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
OAException.INFORMATION);
//set default file name: [YYYYMMDDhhmm_IN.EXCEL,FILE_NAME.csv]
StringBuffer strFileName
= new StringBuffer().append((pageContext.getCurrentDBDate().toString().substring(0, 16))
.replaceAll("-","").replaceAll(" ","").replaceAll(":",""))
.append("_IN.").append(strExcelFileName).append(".csv");
//give csv file content
BlobDomain csvFileBlob = (BlobDomain)am.invokeMethod("createCsvFile");
//setenv
HttpServletResponse response
= (HttpServletResponse)pageContext.getRenderingContext().getServletResponse();
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment; filename="+strFileName.toString());
System.out.println("fileName : "+strFileName.toString());
//download
InputStream fileIn = csvFileBlob.getBinaryStream();
long fileLen = csvFileBlob.getBufferSize();
int readBytes = 0;
int totalRead = 0;
byte blockgbyte[] = new byte[65000];
response.setContentType("application/x-msdownload");
response.setContentLength((int)fileLen);
while((long)totalRead < fileLen)
readBytes = fileIn.read(blockgbyte, 0, 65000);
totalRead += readBytes;
response.getOutputStream().write(blockgbyte, 0, readBytes);
fileIn.close();
response.getOutputStream().flush();
I don't know what's matter in the app, can you tell me how to deal with it.
Thanks in advance.

Hi there,
I have a similar requirement. User will download search results in a CSV file after which I want either the page to be refreshed or to be able to goto a Confirmation page or navigate to another page.
I tried using setForwardURL / forwardImmediately / redirectImmediately methods as well as redirectToDialogPage. Since we use pageContext.setDocumentRendered(false); and response.getOutputStream().flush(); methods, the HttpResponse is already committed.
Hence, the page does not redirect to another page as Request is processed and Response is complete. In case of methods like setForwardURL A JSP forward redirects the same request object to the target URL.
Can anyone help here to achieve the expected requirement?
Thanks.

Similar Messages

  • How can I save a page and all its component parts in a single file, like IE does as an MHT - it's much easier for mailing to people where page address not available?? (as in output from an airline booking site, for example)

    how can I save a page and all its component parts in a single file, like IE does as an MHT?
    It's much easier for mailing to people where page address not available?? (as in output from an airline booking site, for example)
    It is simply too painful to have to zip everything up into a single file to send. MHT format has been available for years now from IE, and with every new FF release it's the first thing I look for. I have been using FF for years, and hate having to come out of it, over into IE |(which I even took out of startup) and key everything in again, in order to send somebody something in a convenient format that they can open with a single click.
    I can't believe this hasn't been asked before, so have you looked at it and rejected it? Have MS kept the file format secret?
    Thanks
    MG

    This is not really an answer just my comments on your question.
    I am sure I recollect efforts being made to get mhtml to work with FF.
    Probably the important thing to remember about .mhtml is that if other browsers do support it they may need addons, and may not necessarily render the content correctly/consistently.
    There are FF addons designed for archiving webpages, you could try them, but that then assumes the recipient has the same software.
    You could simply save the page from FF to your XP pc; then offline open it with and save it using IE, before then emailing using FF, and attaching the .mht or mhtml file that you have now created on your PC.
    As an alternative method, in some cases it could be worth considering taking a screen grab of the required page, then sending that to the recipient as a single email attatchment using either a bitmap or jpeg file format for instance.
    Something such as an airline booking may be designed with a print option, possibly it could be worthwile looking at sending the print file itself as an email attachment.

  • How can I enable FTP on the DMP and How can I FTP to it and then remove the files that were deployed to the DMP flash?

    How can I enable FTP on the DMP and How can I FTP to it and then remove the files that were deployed to the DMP flash? My platform of DMS is 5.2.2

    Hi Temur, ok. I do the above procedure and it worked fine
    Now, I have other question?
    How can I reproduce any file (for example: a video, an url page, an image), that is in the flash of DMP?
    Índice de ftp://172.17.15.22/tmp/ftproot/tmp/ftproot/tmp/ftproot/usb_1/
    Subir al directorio superior.
    Nombre Tamaño Última modificación
    Sample Videos.lnk
    1 KB
    17/06/2011
    06:25:00 a.m.
    deployment
    29/06/2010
    04:14:00 a.m.
    lost+found
    25/02/2010
    12:00:00 a.m.
    video futbol en la playa.mp4
    1390 KB
    29/06/2010
    01:08:00 a.m.
    videofutbol.mp4
    1390 KB
    29/06/2010
    01:38:00 a.m.
    I like, that el DMP when loss conectivity with DMM, It display at the LCD screen, the video named videofutbol.mp4, this video As I show in the picture above, already in the flash of DMP.
    I appreciate your early response.
    Thanks

  • How can i hide a JFrame and then Show it again in runtime

    How can i hide a JFrame and then Show it again in runtime??
    Please, please help me
    Its URGENT

    Here's even an example:
    import javax.swing.*;
    public class HideAndShow extends JFrame
         public HideAndShow()
              super("Hello");
              setSize(200, 200);
              setVisible(true);
              try
                   Thread.sleep(2000);
              } catch(InterruptedException e) {}
              setVisible(false);
              try
                   Thread.sleep(2000);
              } catch(InterruptedException e) {}
              setVisible(true);
         public static void main(String[] args)
              new HideAndShow();
    The JFrame will show, then hide, then show again. This is at runtime.

  • Our Band purchased Logic Pro and it was loaded to one member's Macbook Pro. Unfortunately, he passed away with cancer in May. How can we transfer the ownership and the software (it was downloaded) to a new user's Macbook?

    Our Band purchased Logic Pro and it was loaded to one member's Macbook Pro. Unfortunately, he passed away with cancer in May. How can we transfer the ownership and the software (it was downloaded) to a new user's Macbook?

    Hi Kurt,
    The Mac IIci is not even powering on at all. Tried again with wih a tested power cable and no luck. 
    I think it's best that take  this issue to the Older Hardware Community. Not only did I see a fair number of replacement parts for the IIci avaiable online, but there also vintage external floppy drives as well. I'm not giving up.
    Thank you for your time and interest in helping.

  • How can I stop the constant and repeated pop-up to sign-in to iTunes?

    How can I stop the constant and repeated pop-up to sign-in to iTunes?

    You might have an app or iTunes purchase that belongs to a different Apple ID.  Look very carefully at the popup and make sure it is referenceing your correct Apple ID.

  • How can I select next page when on shopping website

    When I'm on a shopping website, like BLoomingdales for example, I can't select next page or page 2.  It only stays on the 1st page.  Why is this?

    Hi,
    if you have 3 pages in a smartform do this
    DATA:L_NAME(17)   TYPE C VALUE '%HEADER-FIRSTPAGE'.
    FIELD-SYMBOLS: <FIELD>.
    if plant = '1000'. A page -> B page
      ASSIGN (L_NAME) TO <FIELD>.
      IF SY-SUBRC EQ 0.
        <FIELD> = 'PAGEA'.
      ENDIF.
    ENDIF.
    else               A page -> C page
      ASSIGN (L_NAME) TO <FIELD>.
      IF SY-SUBRC EQ 0.
        <FIELD> = 'PAGEC'.
      ENDIF.
    ENDIF.
    Thanks,
    Nethaji.
    Edited by: Nethaji babu on Apr 30, 2008 8:47 AM

  • How to show the first page and then rest will be created in background

    Dear Friends,
    I am suffering from some seriouse issue of slow opening of report....
    I am using vs2005 and asp.net 2.0 and crXI R2 sp4,
    using oledb for getting data from ms sql server 2005.
    Now my one report called accounts ledger
    when i execute the report query it takes 1.03 mins for 515000 records..no issue with it ,
    when i execute the report from report desginer for 515000 records its taking 26 mins . It is generating all
    32000 pages.
    Now same report i run from my web based erp application it takes 30mins to execute 32000 pages now
    this is too much time it is taking and now our client is fedup of ussss..
    So is there any way that we can show First page at the earliest and rest of the pages willl be getting created in background? is it possible ?
    We have to give them the solution as sson as possible...
    can anyone suggest the diff ways to get out of this problem .......
    Please ur co operation will be appriciated....
    thansk

    Hi Mithun,
    Here are a few points related to performance issue. These might be helpful.
    The performance of a report is related to:
    External factors:
    1. The amount of time the database server takes to process the SQL query.
    ( Crystal Reports send the SQL query to the database, the database process it, and returns the data set to Crystal Reports. )
    2. Network traffics.
    3. Local computer processor speed.
    ( When Crystal Reports receives the data set, it generates a temp file to further filter the data when necessary, as well as to group, sort, process formulas, ... )
    4. The number of records returned
    ( If a SQL query returns a large number of records, it will take longer to format and display than if was returning a smaller data set.)
    Report design:
    1. Where is the Record Selection evaluated?
    Ensure your Record Selection Formula can be translated in SQL, so the data can be filter down on the server, otherwise the filtering will be done in a temp file on the local machine which will be much slower.
    They have many functions that cannot be translated in SQL because they may not have a standard SQL for it.
    For example, control structure like IF THEN ELSE cannot be translated into SQL. It will always be evaluated
    in Crystal Reports. But if you use an IF THEN ELSE on a parameter, it will convert the result of the condition to
    SQL, but as soon as uses database fileds in the conditions it will not be translated in SQL.
    2. How many subreports the report contains and in section section they are located.
    Minimise the number of subreports used, or avoid using subreports if possible because
    subreports are reports within a report, and if you have a subreport in a details section, and the report returns 100
    records, the subreport will be evaluated 100 times, so it will query the database 100 times. It is often the biggest
    factor why a report takes a long time to preview.
    3. How many records will be returned to the report.
    Large number of records will slow down the preview of the reports. Ensure you only returns the necessary data on the report, by creating a Record Selection Formula, or basing your report off a Stored Procedure, or a Command Object that only returns the desired data set.
    4. Do you use the special field "Page N of M", or "TotalPageCount"
    When the special field "Page N of M" or "TotalPageCount" is used on a report, it will have to generate each page
    of the report before it displays the first page, therfore it will take more time to display the first page of the report.
    If you want to improve the speed of a report, remove the special field "Page N of M" or "Total Page Count" or formula that uses the function "TotalPageCount". If those aren't use when you view a report it only format the page requested. It won't format the whole report.
    5. Link tables on indexed fields whenever possible.
    6. Remove unused tables, unused formulas, unused running totals from the report.
    7. Suppress unnecessary sections.
    8. For summaries, use conditional formulas instead of running totals when possible.
    9. Whenever possible, limit records through selection, not suppression.
    10. Use SQL expressions to convert fields to be used in record selection instead of using formula functions.
    For example, if you need to concatenate 2 fields together, instead of doing it in a formula, you can create a SQL Expression Field. It will concatenate the fields on the database server, instead of doing in Crystal Reports.
    SQL Expression Fields are added to the SELECT clause of the SQL Query send to the database.
    11. Using one command as the datasource can be faster if you returns only the desired data set. It can be faster if the SQL query written only return the desired data.
    12. Perform grouping on server
    This is only relevant if you only need to return the summary to your report but not the details. It will be faster as less data will be returned to the reports.
    Regards,
    Shweta

  • How can I forward an email and include the attached images?

    I sent a client an email with attahced images (I attached the images, pictures I took).  The client responded with the images attached to the response.  When I try to forward that response to a third party the attached images become place holders only, no image. 
    Shouldn't my forwarded mail include the images?  Short of re-attaching the images how can I get them included in the forwarded email?

    I tested a few I forwarded to myself and I could still forward with attachments. You might try Redirecting it (Message menu).

  • How can I uninstall imovie '09 and then reinstall it?

    My imovie is not working as it should, and the only thing I can think of to do is to uninstall it and hope that it will then be working properly again when I reinstall. Can anyone help please?

    Hello pritammmul,
    If you follow the steps in the article below, it will erase all the contents and then install the latest version of iOS on your iPhone.
    Use iTunes to restore your iOS device to factory settings
    http://support.apple.com/kb/ht1414
    Regards,
    -Norm G. 

  • How can I scan to PDF and then save as Word?

    Don't know if the above got through or not.
    When I scan in documents do I scan as jpg or tif when I want to convert to PDF then to MS Word?

    Hi George,
    I think I've answered this another post of yours. The best bet is to go straight from the scanner to a format that Word can read (most scanning software should offer that capability), and cut out the middleman (as much as I love Acrobat, it's not necessary in this case).
    Best,
    Sara

  • How can PhaseListener forward to page?

    Hi guys! I have javascript dropdown menu with links. The links url is something like /faces/session-filter/nextPageName.jsp. When jsf receives the request phaselistener is invoked. I make some cleaning of session beans and i want to redirect to the nextPageName.jsp. How to redirect?

    Like this
    FacesContext.getCurrentInstance().getExternalContext().redirect(((HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest()).getContextPath() + "/faces/foraPrazoEntrega.jspx");

  • How can I combine the audio and video files from youtube downloads when they don't automatically combine?

    I'm using YouTube Video and Audio Downloader. Sometimes the audio and video files combine automatically, sometimes they don't - remaining as separate " DASH - .m4a and DASH - .mp4 ". It used to be that when this would happen I could open up a "ffmpeg" window which would allow me to "manually" convert them to a combined .mp4 file. It was a "drag and drop" type of interface. For some reason I can no longer access that ffmpeg combining function. I tried clicking on ffmpeg.exe. I tried re-downloading ffmpeg several times, both from the Downloader options tab and from the ffmpeg website.
    Thanks for your help.

    Sounds like a question for the developer of the video download add-ons that you have installed.

  • How do I create a signature,and then add it to an e ailed document?

    How can I create a signature and then use it to sign a document in e mail?

    Not sure I understand the question correctly.
    Open Mail and click on Preferences under the Mail menu. Click on the Signatures icon in the toolbar. You can set up your signatures there.
    But if you are talking about adding a written signature, then you cannot do that within Mail. You would need to scan in an image of your written signature then manually add it to a signature you create in mail as a graphic image. That seems to work.

  • VB CS4 - How send many textframe to a document to fill page and then another

    Hi,
    Sorry by my bad english, I'm using CS4 and vbscript.
    Need to take information from several fields in a database and send it to an Indesign document. Progressively fill a page and then another.
    How do you add a textframe automatically for each field and the pages needed.
    With my current code, I can put a box on every page. But I want to put the text fields below and once you fill the page, switch to another.
    Thanks.
    Jorge
    Current code:
     For i As Integer = 0 To myDataSet.Tables(0).Rows.Count - 1myPage = myDocument.Pages.Item(i + 1)
    myTextFrame = myPage.TextFrames.Add
    Dim myArray1 As String() = {"4p", "4p", "60p", "20p"}myTextFrame.GeometricBounds = myArray1
    myTextFrame.Contents = myTextFrame.Contents + (myDataSet.Tables(0).Rows(i).Item("name")).ToString + vbCrmyTextFrame.Contents = myTextFrame.Contents + (myDataSet.Tables(0).Rows(i).Item(
    "adress")).ToString + vbCrmyDocument.Pages.Add(idLocationOptions.idAfter, myDocument.Pages.Item(i + 1))
    Next

    The Quiz Results slide's Continue button actions are set under Quiz Preferences > Pass or Fail > If Passing Grade etc. By default, the Continue button is set to just continue on to the next slide after the Quiz Results.
    After the user clicks the Continue button on the Quiz Results slide any Pass/Fail actions you've set up there will be evaluated and executed.
    So if the user achieved a passing score, and you set up an action such as Go to URL in Current Window for that case, then the user should find themselves redirected to that URL.  If there was a different action for Failure, and the user failed, then that should happen.  But either of these will only happen after the Continue button is clicked.
    I tested this by setting www.google.com as the go to URL and it worked.  To see if the URL is the issue, try using another URL that you know everyone can get to.  If that works, try to find out why the URL you want to use is not working.  If no URL works, something else is interfering with the action.

Maybe you are looking for

  • BADI for Address Check in PA30 in ECC6.0

    Hi Friends, Is there any BADI for Address Check in PA30 in ECC6.0 similar to what we have in BP transaction in ECC6.0. Thanks, Pradeep

  • Using my .mac account on iChat AV (problems)

    Hi, I've been using iChat AV with my .mac account since december, and it was all fine 'til some weeks ago. From the end of may 2006 I have many problems using my .mac account in iChat AV. Sometimes I can connect, but usually I can't connect! And the

  • Scary problem! Old photos suddenly dark, low resolution.

    Going through some old pictures I've just noticed that 3-4 sets from 4 years ago have become very dark and lower resolution. The weirdest part is that they are not complete "sets" -- that is, the darkness seems to in random groups of certain sets (i.

  • Characteristic 0EMPLOYEE is blocked by conversion

    Hi Gurus. I added 2 Attributes to 0EMPLOYEE infoobject and made them navigational. Now, when I try to activate 0EMPLOYEE it times out and I get this message when I come and try to enter edit mode for 0EMPLOYEE: Characteristic 0EMPLOYEE is blocked by

  • I would like to backup my hard drive by creating backup/recovery dvds..

    I am using DVD-R discs and would like to backup my hardrive.  There are basic instructions listed in the manual under "creating recovery discs" . Just want to know if this is the proper procedure before I begin.