Using a form to download files

Hello

I want to download an xml file and use the file in a java class.

My first step: I use the following form to download the file, but it seems that it does not download at all.
< are method = "POST" action = "<$ $HttpCgiPath >? IdcService = IO"enctype =" multipart/form-data">
< input type = "hidden" name = "IdcService" value = "IO" / >
< table >
< b >
Dateiname < td > < table >
< td > < input type = "file" name = name of the file "/ > < table >"
< /tr >
Knoten < td > < table > Id
< td > < input id = "txtNode" type = "text" name = "NodeID" value = "" / > < table >
< /tr >
< b >
< td > < input type = "submit" name = "job" value = "Export" / > < table >
< td > < input type = "submit" name = "job" value = "Import" / > < table >
< /tr >
< /table >
< / make >

My second step: (this step is never reached)
The IO IdcService runs the Java importNode() method;

public class Interface extends service {}
Public Sub importNode() survey DataException, ServiceException {}
try {}
Vector vector = m_binder.getTempFiles ();
System.out.println ("anchor1:" + vector.isEmpty ()); is not printed to the output of 'server '.
File (File) = vector.firstElement ();
System.out.println ("anchor2:" + file.getAbsolutePath ()); is not printed in the output of 'server '.
} catch (Exception e) {}
e.printStackTrace ();
}
}

No errors will be printed in the output of the server.

Need help. How can I download files and use them with my Java classes?

Thank you
Brahim

Hello
Maybe I'm not sure, but with the GET_DYNAMIC_URL service,
you have to put the "fileUrl" in the binder.

Agur, come

Tags: Fusion Middleware

Similar Questions

  • I use IE9 and cannot download files on Web sites. Is there a solution?

    I use IE9 and cannot download files on Web sites.  It allows me to locate the file, and then he says your file is downloaded, but just keeps spinning.

    This happens on several sites and when I call their tech support, I said that there is a problem with IE9. If I use another laptop with IE8, there is no problem.

    Open a browser window,

    Press the F12 key, then click browser mode,

    Click on ie8.

  • How to use the OPA form to download files?

    Hello!

    I was tring to download the file using the form of the OPA. I have two questions

    1 Wheather my approach is correct or not
    2. I am facing the error

    Approach

    I did a check custom and used OnRequestEventHandler to the custom control the
    < input type = "text" has been replaced by
    < input type = "form.

    changes have been made to form.vm

    where

    * < form name = 'form' accept-charset = "UTF-8" method = "POST" action = "${post-uri}" target = "${frameset-top-target} ' > *.

    has been changed to

    * < name of the form = 'form' ENCTYPE = ' multipart/form-data' accept-charset = "UTF-8" method = "POST" action = "${post-uri}" target = "${frameset-top-target} ' > *.

    and writes the following Java Code

    2 error

    Reason for the change of form.vm
    OPA throws a null pointer exception


    Please help solve my problem or just give me a solution thanks


    below is the java code that I used also

    _________________________java code________________________
    package com.aosf.handlers;

    import java.io.DataInputStream;
    to import java.io.FileOutputStream;
    import java.io.IOException;

    to import javax.servlet.http.HttpServletRequest;

    import com.oracle.determinations.web.platform.eventmodel.events.OnRequestEvent;
    import com.oracle.determinations.web.platform.eventmodel.handlers.OnRequestEventHandler;
    import com.oracle.determinations.web.platform.plugins.WebDeterminationsServletPlugin;
    import com.oracle.determinations.web.platform.plugins.WebDeterminationsServletRegisterArgs;

    public class getFile implements {OnRequestEventHandler}

    ' public void handleEvent (Object arg0, arg1 OnRequestEvent) {}
    TODO self-generating method stub
    HttpServletRequest request = arg1.getHttpRequest ();

    String contentType = arg1.getHttpRequest () .getContentType ();
    System.out.println("###GetFile:"+ContentType);
    If ((contentType! = null) & & contentType.indexOf("multipart/form-data") > = 0) {}
    try {}
    In DataInputStream = new DataInputStream (request.getInputStream ());
    int formDataLength = request.getContentLength ();
    System.out.println("ContentLength:"+formDataLength);

    dataBytes Byte = new ubyte [formDataLength];
    int byteRead = 0;
    int totalBytesRead = 0;
    while(totalBytesRead < formDataLength) {}
    byteRead = in.read (dataBytes, totalBytesRead, formDataLength);
    totalBytesRead += byteRead;
    }

    String file = new String (dataBytes);
    String saveFile = file.substring(file.indexOf("filename=\"")+10);
    saveFile = saveFile.substring(0,saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\") + 1, saveFile.indexOf("\""));"

    System.out.println ("dataBytes" + dataBytes);

    lastIndex int = contentType.lastIndexOf ("=");
    String limit = contentType.substring (lastIndex + 1, contentType.length ());
    System.out.println (Boundary);
    int pos;

    POS = file.indexOf("filename=\"");
    POS = file.indexOf ("\n", pos) + 1;
    POS = file.indexOf ("\n", pos) + 1;
    POS = file.indexOf ("\n", pos) + 1;

    int boundaryLocation = file.indexOf (boundary, pos) - 4;
    startPos = int ((file.substring(0,pos)) .getBytes () .length;
    endPos = int ((file.substring(0,boundaryLocation)) .getBytes () .length;

    FileOutputStream fileOut = new FileOutputStream (saveFile);

    fileOut.write (Octetsdonnees, startPos, (endPos - startPos));
    fileOut.flush ();
    fileOut.close ();

    System.out.println ("file saved as" + saveFile);
    } catch (IOException e) {}
    Generative TODO catch block
    e.printStackTrace ();
    }

    }

    }

    public (WebDeterminationsServletPlugin) getInstance
    WebDeterminationsServletRegisterArgs arg0) {}
    TODO self-generating method stub

    return again getFile();

    }



    }

    ___Java code end___

    Unfortunately, I don't think that there is there a work around. The only thing I can think of that one possibility would be a separate download applet in the Web application, a download button that sends the attachment to this applet and lie next to the Interactive session.

    It sounds like a lot of work, and I don't know if it would work.

    The differences in the HTTP standard for forms set how are managed in fact a very difficult problem to solve.

  • Downloading files using Zend Framework

    I'm tyring use Zend Framework to download files as described in the book "Adobe Dreamweaver CS5 with PHP" by David Powers.  I use the code example (more or less) and can operate perfectly with a local installation of XAMPP Apache and PHP.  However, I can't it works correctly with a site hosted, after trying GoDaddy and Verio.

    Zend Framework is correctly installed, include the paths correctly set (I know that because other Zend FW operations, such as the validation work very well).  In addition, if the directory I want to download on is not specified correctly I have errors on it.  But when I try to actually upload a file (once again, with a code that works on the XAMPP platform), I get nothing.  No errors and no file uploaded.

    I have the script set up to send an email with a link to the downloaded file and the name field is empty (but the email get sent, indicating again that the ZF works).  I'm finding I have something misconfigured on hosting plaforms and am looking for suggestions as what to look.  Thank you.

    BTW, checked the permissions on the download directory, and it should be writable...

    No problems. It's a mistake that we all have at one time or another. I'm glad you find the book useful.

  • Impossible to download files, but can download them

    I recently got a new modem/router to the cable company, now I can not download files. I studied the responses and found that it could be the router. Any help out there?

    Hello

    1. what happens when you try to download the files?
    2. do you get an error message?
    3. what operating system you are using on the computer?

    4. what application you use to upload and download files?
    5. is the relevant question for a particular application?

    You can disable the antivirus installed on the computer software and check.
    Disable the antivirus software:
    Windows 7: http://windows.microsoft.com/en-US/windows7/Disable-antivirus-software
    Windows Vista: http://windows.microsoft.com/en-US/windows-vista/Disable-antivirus-software
    Important note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.


    Provide us more information for you to help.
  • Download file button or download the file by using a form

    Hi I need a file upload button or a file downloaded using a form, what plan I have to do?

    You can go with web marketing plan, if you are referring to BC accommodation to access CRM with cases submitted by users with the attachment of the form.

    Thank you

    Sanjit

  • When I download always little matter that downloads in the form of itunes file, even if it's a photoshop file. How to make a photoshop file to download in format photoshop?

    hen I always download little matter that downloads in the form of itunes file, even if it's a photoshop file. How to make a photoshop file to download in format photoshop?

    For example when I go to this site http://www.envelop.eu/design/templates I can't download these templates. They are confused white pieces of paper and are registered as itunes. He never gives me an option I want to download the files under. ARgh, please help.

    Also, I can't get to the itunes page. It lights up I see pictures and then it simply disables the images and it is just empty but there still the topics. I can play my music but I can not download music or to use the site.

    Either by the way, I have Vista I've ever wanted...

    Hello

    ·         You did it changes on your computer?

    ·         What browser do you use to download files from the internet?

    ·         Were you able to open files in Photoshop and iTunes successfully before?

    ·         In turn the images out on the site ITunes is only on the ITunes site?

    What happens when you click on the. File PSD that is downloaded should open Photoshop or iTunes, if it opens with iTunes and then try to change file associations and see if it works.

     

    Change the program that opens a type of file

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-the-program-that-opens-a-type-of-file

    If steps above has not fixed the problem followed the steps as shown below:

    To set file Associations in Windows Vista

    1. Click Start and click on Control Panel

    2. click on default programs

    3. click on Set Associations.

    4. Select a file type in the list and click the change program.

    You will be displayed a list of programs as well as a Description and the current default. You can click the change program to set or change the current default settings.

    For Web site problems, please follow the procedure according to the link below:

    Internet Explorer is slow? 5 things to try
    http://Windows.Microsoft.com/en-us/Windows/help/Internet-Explorer/slow-five-tips-to-boost-performance

    Hope this helps

    Kind regards

    Kiki

  • ALL my downloads come in the form of HTML files. What have I done?

    Whenever I have download any file, it opens on my computor in the form of HTML files and I can't change it to the TEXT.  What can I do to change this setting?

    What browser you use, and how you download to use? Do you have any download managers installed on your PC?

  • Pop - ups without closing after downloading files using webutil_file_transfer.client_to_as_with_progress on linux machines

    We have an Oracle application that runs on windows and linux machines based on the forms. Application server is database to Oracle 11 g and 10g.

    There is a feature of the application where the user can download his files to the application server, as well as in the database.

    When transfer us files by accessing the application in windows (Internet application), and then download the feature works very well.

    When we transfer files by accessing the application on linux machines, then also download files get stored on the database and application server and features works.

    However, as soon as the download starts a pop-up is launched by displaying the message like "upload to the application server is in progress."

    These pop - ups are not get closed even when the file is downloaded to the application server.

    Can you please let me know how to deal with this behavior

    Application server is database to Oracle 11 g and 10g.

    And you release Forms?  We can only "Assume" you use form 10g since you are using Oracle Application Server (OAS) 10g.  But of course you "Assume" you use OAS 10g since you specifically mentioned.

    Since you have a deployed Web app forms, it would be also useful to know-your-client Java and browser versions.

    We have an Oracle application that runs on windows and linux machines based on the forms.

    When we transfer files by accessing the application on linux machines, then also download files get stored on the database and application server and features works.

    However, as soon as the download starts a pop-up is launched by displaying the message like "upload to the application server is in progress."

    WebUtil is a single library of Windows.  While some of the methods in the library will work on non-windows clients - they are not guaranteed to work on non-windows clients.

    These pop - ups are not get closed even when the file is downloaded to the application server.

    Since you are actually able to get this method to work, I suggest you check the version of the Client operating system and if it's Windows, use the Client_To_As_With_Progress() method and if it's not Windows, then simply use the Client_To_AS() method.  The other option would be to implement a Javabean to file transfer (A FTP Java Bean - Oracle Forms PJCs/Java Beans) in your form that works with any version of operating system Client.

    Craig...

  • Using jquery to download files

    Hello

    I have downloaded the files before but not not using jquery but now trying to use jquery to make my files transfer without refreshing the page.

    It's my Jquery code. and here is the html code. Can someone help me with the jquery code so that I can get the data to the php script that deal

    the variables.

    JQUERY:

    < script type = "text/javascript" >
    {$(document) .ready (function ()}
    {$("#photoform").submit (function ()}

    var phototitle = $("phototitle").val ();
    var photogenre = $("photogenre").val ();
    var photodesc = $("photodesc").val ();
    var photofield = $("photofield").val ();


    .post $("Uploadfix.php", {phototitle: phototitle,)
    {photogenre: photogenre, photodesc: photodesc, photofield: photofield}, {function (data)}
    $("#allresult").html (data);
    });
    Returns false;
    });
    });
    ->
    < /script >

    PHP CODE:

    $phototitle = addslashes (strip_tags($_POST['phototitle']));
    $photogenre = addslashes (strip_tags($_POST['photogenre']));
    $photodesc = addslashes (strip_tags($_POST['photodesc']));

    $photo = $_FILES ['photofield'] ['name'];
    $type = $_FILES ['photofield'] ['type'];
    $size = $_FILES ['photofield'] ['size'];
    $temp_name = $_FILES ['photofield'] ['tmp_name'];
    $error = $_FILES ['photofield'] ['error'];

    echo "$phototitle";
    echo "< br / > ';
    echo "$photo";
    echo "< br / > ';

    echo "$type";
    echo "< br / > ';

    HTML:

    < form id = "photoform" method = "post" enctype = "multipart/form-data" action = ">"

    ID variables:

    < / make >

    How to read in the file of jquery for the success of php. STILL NO SUCESS!

    Thank you.

    Hey Gramps

    Thanks again for the help. In fact, the validation happens in php. The problem is when validatioin happens it happens on process.php

    instead of on the form.html. For example, the form has 4 inputs and a file download option. In process.php, the code verifies that the user has put

    the entry and filled in all the fields. If this is not the case, the php echoes fill in all fields. But echo, fill in all the fields that happens in process.php instead of display

    fill all fields on the results DIV form.html.

    The code is on the previous post.

    Thanks again.

    See you soon.

  • What will be the form of the file (file://) Protocol in firefox? Using file://servername/foldername, I am uable to open a folder. But she supported in other browsers. Need a quick solution to this issue.

    What will be the form of the file (file://) Protocol in firefox? Using file://servername/foldername, I am uable to open a folder. But it

    supported in other browsers. Need a quick solution to this issue.
    I used following code snippets:
    < a href = "file://PC2/c$" > open the file < /a >
    It is used to open C: /. But it does not work in other browsers except Mozilla.

    Need a solution as soon as possible...

    See also:

  • When downloading using firefox I should save the download, and then must go to the download file to start the download. When I download using internet explore I can run a download at the time where as it is downloaded. Can I change a setting somewhere?

    I use Windows 7 with firefox as my default browser. When I download a program using firefox, I wonder if I want to save the file, and then must go to the download folder to start the download. When I download using internet explorer, I gives me the ability to run the download at the time where it is downloaded instead of save the download. Is there a setting I can change to allow me to run downloads when using firefox instead of record?

    Hi shortwedge3,

    You can use the OpenDownload2 extension for the run option when downloading files with Firefox

  • Cannot download files with plupload using Firefox 7 / Aurora (beta)

    I'm unable to download a file (using drag - move OR select file) with plupload and Firefox 7.

    Everything worked fine with Firefox 6. When I try to download a file with plupload, firefox thinks I'm trying to install an extension.

    http://www.Plupload.com/

    I had the same problem. Today, I upgraded to the latest version of Plupload and now it works again!

  • I can't download the PDFs in the form of pdf files, why?

    I can't download the PDFs in the form of pdf files, why?  AutoCAD opens immediately instead of pdf file.  If everything is coded to open with word.  What should I do?

    Make sure that the file association is set up correctly.

    How to set file Associations:

    http://articles.TechRepublic.com.com/5100-10878_11-6172036.html

    How do I... Change file extension associations in Windows Vista?

    See you soon.

    Mick Murphy - Microsoft partner

  • Unable to download file greater than 2 GB by using cffileupload

    I am able to download files of 1 GB.

    However, when I download the 2.2 GB file, it is facing the 99% complete. I get no error.

    I use ColdFusion 11 on a Windows Server R2 machine 2012.

    1. in the ColdFusion code, I put the limit of files to 3.2 GB.

    main page of cfm:

    < cffileupload

    URL = "uploadFilesProcess.cfm? "PAR1 = #STORAGEDIRECTORY #

    ProgressBar = 'true '.

    BGCOLOR = "##FFFFFF."

    Width = 500

    height = 250

    maxuploadsize = 3200

    title = "Send file" / >

    uploadFilesProcess.cfm:

    < cfset param1 = url ["par1"] / >

    < cffile action = "uploadAll" destination = "" #param1 # "nameconflict ="overwrite"/ >"

    2. in the parameter of the ColdFusion server, I put the following:

    Para POST request max number: 3200

    Data of maximum message size: 3200 MB

    Request throttle threshold: 4 MB

    Request throttle memory: 3200 MB

    3. in the filter setting IIS of Windows, I put the maximum length of authorized content (bytes) to 3200000000.

    It is also 2 GB is a download limit for most browsers. Try Chrome or Opera.

Maybe you are looking for