How i can make the code execute after file finish downloading

Hi,
i have a code that downloads a file
then some code after , my problem is that code after does not wait to the file finish downloading
how i can achieve that
code is:
String contentType = "application/x-download" ;
FacesContext fc = FacesContext.getCurrentInstance();
HttpServletResponse response =
(HttpServletResponse)fc.getExternalContext().getResponse();
response.setHeader("Content-Disposition",
"attachment; filename=" + l_patch_name + ".zip");
response.setContentType(contentType);
try
FileInputStream fis=new FileInputStream("c:\\patches\\"+ l_patch_name + ".zip");
OutputStream os= response.getOutputStream();
int byteRead;
while(-1 != (byteRead = fis.read()))
os.write(byteRead);
os.close();
if (fis != null)
fis.close();
catch(Exception e){
DisplayMessage("Error in downloading the file");
// now update the token
OperationBinding operationBinding2 =
bindings.getOperationBinding("UpdateTokenField");
String UpdateTokenResult = (String)operationBinding2.execute();
DisplayMessage(UpdateTokenResult);
// now refresh the table
OperationBinding operationBinding3 =
bindings.getOperationBinding("RefreshPatches");
Object result3 = operationBinding3.execute();

Hi,
the above code is excuted succesfully, but if i have
return "Navigation" ;
it is not working
any idea why??????????

Similar Messages

  • How on can get the plaback of .mov files with Redcode Codecs?

    Hi folks,
    I am not able to play the .mov files created by Red camera so..
    how one can get the playback of .mov files with Redcode Codecs?

    Well, one typically doesn't edit with any of the proxy-files the RED camera produces.  You need to convert the RED footage to ProRes.  Log and Transfer can do this, if you download and install the RED Log and Transfer plugin.  Or you might need to use RED software to convert the footage to ProRes.  But those Red proxy files won't import via log and transfer, and are NOT editable in FCP.  Gotta convert to ProRes.

  • How i can  Make the project exectued program

    Hi all
    please how i can Make my project an exectued program
    i used the compiler of JBuilder (Borland)
    and i want to make exe program
    how i can do that?
    thank's
    karfer

    I'm not familiar with JBoreland IDE, but is there a way to export your project .jar file?
    If so than theres your solution. .Jar files just need to be exected (IE: Double click.) Also if this isn't the appropriate solution than you can export to a .jar file and use JSmooth to turn your .jar file into a .exe. For any other solutions I suggest you look on google.

  • TS1292 What is iTunes Gigt Card and how i can find the code

    Dear Team,
    I just started use Iphone4, I have problem during redeem, i want to understand more what is iTuned gift Card and how i can find the cord

    Look on the back of the card.  You may have to scratch off.

  • How do i make the program hold after it has created a JFrame

    I have created a JFrame with which the user shall login to a server. I call this JFrame from my main method (the JFrame-class is in a separate file). My problem is that after the login-window is created and set visible, my main method continues, i would like it to wait until the user have logged in before running the rest of the code.
    this i my main method:
    new LoginWindow();
    System.out.println("Logged in: "+Session.isLoggedin()+
                    "\nUsername: "+Session.getUsername());Session.isLoggedin() returns a boolean, true if user is logged in and otherwise false. class LoginWindow extends JFrame.
    i have tried to use a while-loop to solve my problem:
    while(!Session.isLoggedin()) { }and also
    whiel(true){
        if(Session.isLoggedin())
            break;
    }these while-loops never breaks, i have waited for about 3 min after successful login.It isn't because Session.isLoggedin() returns false, it does return true after a successful login (i've checked).
    the funny thing however is if i print something in the while-loop i does break when login is finished
    example:
    whiel(true){
        System.out.println(Session.isLoggedin());
        if(Session.isLoggedin())
            break;
    }this code makes the program wait until the login-phase is complete but i don't want it to print "text" a few thousand times while the user is logging in. (i've used "hej" as output aswell)
    Since i have no idea how long it will take for a user to log in i can't use the System.sleep(value) method.
    I would really appreciate any help
    Thanks in advance
    //Oscar

    SnuShogge wrote:
    I am still curious about why the while-loop only breaks if i print something using System.out.println(""), i didn't think that would make a difference since the break-statement remains the same.In general you should avoid trying to use while (true) or its variants in a Swing GUI as it often messes with the EDT, the main thread that renders the GUI graphics and interacts with the user.
    My problem i however partially solved by using a JDialog instead of a JFrame. I am planning on using JFrame later in the program so the problem might come back to haunt me if it isn't solved.This may not be a great idea. Usually an application has one single JFrame. Most other distinct windows a dialogs of one sort or another and should be JDialogs, not JFrames. Often better still is to use a CardLayout to swap JPanels or other components.

  • How to step thru the code in jar file.

    I am trying to step through the code in the jar file. My code is a Java stored procedure which uses a jar file. Whenever I try to Trace into the code residing in the jar file I am always hitting the
    JDeveloper API Decompiler STUB SOURCE generated from class file.
    I tried to set up the Class path and Source path in the Project Options but it didn't help.
    Any help is appreciated.
    Thanks.

    If are trying to debug the Java Stored Procedure deployed in Oracle8i (816), then you should be using Remote Debugging feature in JDeveloper 3.1
    check out http://technet.oracle.com/products/jdev/info/jdev/rdjsproc/s000.html http://technetinside.us.oracle.com/products/jdev/info/rdebugwp/rdebugwp.html
    raghu

  • How do I make the background of a file transparent (clear)?

    I am trying to place our logo into a presentation. It always comes up with a white backround, altho it shows transparent in the photshop file. How do I get it to be clear around the name and art that is in the logo?

    Hi Mimi,
    If your logo is coming up 'transparent' when you insert it into Photoshop but coming up with white background when you save it, it is one of the two things:
    You have a background layer (white) in your photoshop file
    You're exporting as JPEG or one of the other file formats that doesn't support transparency
    Follow these steps to get a transparent image from Photoshop for use in other programs such as Powerpoint or Word.
    Create a new document in Photoshop (File > New), ensure your background content setting is 'Transparent' as shown above
    Notice that your document doesn't have any white background
    Click File > Place and choose your logo file into Photoshop
    Notice the image I've placed is already a transparent image (based on your original question)
    Click on 'Crop' tool as shown above on the left and change setting to 'Unconstrained' as shown above. This will let you crop your image to the size of your logo before exporting it. Choose the sliders and select your crop area for the image. Hit Enter once you've selected your area.
    Now you'll have something like this. Your photoshop file will be cropped to your image and we're now ready to export this as an image.
    File > Save As to directly export this as a usable file for other applications. You could also first 'Save' the file as .PSD (for future editing) and then proceed to 'Save As'.
    Ensure the file format is 'PNG' or 'GIF''. This allows for transparency and also is lesser in filesize. I prefer PNG due to its superior quality. Hit Save.
    This is the output PNG file - a transparent file.
    Trust this helps.
    Feel free to post back if you have any more questions.
    Cheers,
    ST

  • How to make the document dirty after updating the links?

    Hi,
    I am using the below code to update the link resources by providing new URI. The link resources are getting updated, but the document is not becoming dirty.
                    InterfacePtr<ICommand> updateCmd(CmdUtils::CreateCommand(kLinkResourceStateUpdateCmdBoss));
                    InterfacePtr<ILinkResourceStateUpdateCmdData> updateCmdData(updateCmd, UseDefaultIID());
                    updateCmdData->SetResource(ref.GetUID());
                    updateCmdData->SetDatabase(ref.GetDataBase());
                    updateCmdData->SetNotify(true);
                    updateCmdData->SetUpdateAction(ILinkResourceStateUpdateCmdData::kUpdateURI);
                    updateCmdData->SetURI(newURI);
                    updateCmd->SetUndoability(ICommand::kRegularUndo);
                    CmdUtils::ProcessCommand(updateCmd);
    How do I make the document dirty after updating the resources?
    Thanks,

    Thanks. It is working fine.
    I called PreDirty(docPtr), before updating the links.

  • How I can make actions for write the file name in front image

    Hello All
    How I can make actions for write image(file)  name in front the image automatically in photoshop cs3.
    Thanks

    This script tutorial might be helpful:
    http://av.adobe.com/russellbrown/CaptionMaker_SM.mov

  • How do we make the apple icon on Macbook pro?

    Hi, I wonder how I can make the apple icon on Macbook pro and how i make a heart ( not like this - <3) Someone knos what I have to do?

    Option-shft-K will get you the Apple logo in many, but not all, fonts.
    To find a font with a heart glyph use Character Viewer.
    Topher Kessler provides a how-to in this CNET article. He even uses "heart" in his search example.
    http://reviews.cnet.com/8301-13727_7-57353404-263/how-to-use-the-os-x-character- viewer/
    Matt

  • How I can get URL to not Java file which in Classpath?

    Somewhere in ClassPath I have xyz.xml file.
    How I can get the URL to this file if I know only name?
    Thanks,
    Jenya

    ???Search the entire file system with a FileSystemView???
    ???Use System.getProperty("java.library.path") to limit the directories you search???
    ???Hope like hell the user doesn't name some random file xyz.xml???

  • How i can make in the same action 2 condition (check the exemple down)

    how i can make in the same action 2 condition (check the exemple down)
    this is an example and I really thank you for helping me(any body plz)
    http://www.2shared.com/file/DPpdgC_a/Exemple_Edge.html

    1. make each rectangle a symbol  (Symbol_1 and Symbol_2) and uncheck autoplay()
    2. Delete your code on the click event and put the following code in compostion ready:
    var toggle=true;
    function btnPlay(){
              if (toggle){
                        toggle=false;
                        sym.getSymbol('Symbol_1').play();
              else{
                        toggle=true;
                        sym.getSymbol('Symbol_2').play();
    sym.$('Ellipse').click(function(){
              btnPlay();

  • How i can keep my code after %dba standard table in sap query

    hi expert,
    how i can keep my code after %dba standard table in sap query..
      add 1 to %count-VBRP.
      %linr-VBRP = '01'.
      extract %fg01.
      %linr-VBRP = '02'.
      extract %fg02.
      %linr-VBRP = '04'.
      extract %fg04.
      %linr-VBRP = '05'.
      extract %fg05.
      %ext-VBRP05 = 'X'.
        extract %fgwrVBRP05.
    endselect.
    i want keep my code after filling the standard table generated by sap abap query
    Thanks & regards
    Sajad Ahmad

    Hi,
    the above code is excuted succesfully, but if i have
    return "Navigation" ;
    it is not working
    any idea why??????????

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • Before I updated my iPod I had all of the songs to an album that I bought on iTunes. After I updated my iPod I only have 5 of those songs from the album. I would like to know how I can get the rest of the songs cause I already paid for the album and I wen

    Before I updated my iPod I had all of the songs to an album that I bought on iTunes. After I updated my iPod I only have 5 of those songs from the album. I would like to know how I can get the rest of the songs cause I already paid for the album and I went on my computer and it said that I have to pay for them even though I already paid for the whole album. So what do I do?

    Sync with the same computer iTunes that you normally sync with.

Maybe you are looking for

  • Clearing GR/IR with Price Variance

    Hi Friends, 1) We created a PO with Qty 1 and price $ 67.50. 2) First, GR was made and system calculated $ 67.50 as Moving Average Price. 3) Then Invoice was entered for $ 73.17.  4) For some reasons, GR was reversed. This time system calculated $ 73

  • How to debug a procedure in an attached library?

    Hi everybody, I am working with Developer Suite 10g on a 9iR2 database.I am 'playing' with F90UTIL pl/sql library which comes with the Forms Demos (downloaded from otn). I created a form to which I attached the F90UTIL library. On a WHEN-BUTTON-PRESS

  • How to publish for Google ADP, and make use of clickTag like Flash

    The transition from Flash to Edge Animate seems pretty straightforward from a coding/user perspective. I have not been able to find a solid answer on how to publish a banner ad, say a 728x90 leaderboard and deliver to a vendor. I need to know: 1. Whi

  • Satelliate 1115-S103 Correct Reinstall Disks?

    I need to reinstall Windows XP that came with my 115-S103. I have a set of 2 CDs that may have come with this computer but could easily have come from another. Here are what they say 1) "SOFTWARE cd-rom"   below that "system recovery and backup shoul

  • Actual Activity Quantity

    Hi Somebody please explain how the actual activity quantity is confirmed on the production order ?