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.

Tags: Oracle Applications

Similar Questions

  • How to use the my serial key download and install CS5.5 Design Standard Suite on a new computer?

    I have my serial number Creative Suite Standard CS5.5 my father bought me and installed on my old iMac 4 years ago. I just got a new Macbook and I would like to download the design suite on it. I don't have the serial number, but I don't have Adobe account information my father. I'll be able to install it on the new computer without his account information (whether it was bought with) if I have the serial number? How can I download and install the Creative Suite CS5.5?

    Bonus question: I just want to design more for Illustrator and InDesign, as I already have Photoshop CC on my new computer. Is there anyway to choose which downloaded programs, or will I have to download all of them and then remove Photoshop afterwards?

    Download CS5.5 products

    Mylenium

  • 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

  • I would use the external drive to download my photos, documents, etc. but do not know how to proceed.

    I just got my old crash (desk top) computer. I knew it would, so I transferred all my information on an external hard drive. I bought a dell 2020 with windows 8, only bought a few days ago. I would use the external drive to download my photos, documents, etc. but do not know how to proceed.  My old computer won't start at all, that's why I got the external drive. Could someone please help me with this task. Thank you.

    Original title: confused

    You can simply plug it in, connect the external hard drive, make sure it is turned on.

    Then copy and paste on your files.

    In Windows 8, start File Explorer

    Highlight all the files and folders

    Click on copy on the Ribbon (Home tab)

    Then then paste into their respective folders

    Press Windows key + R

    Type: %UserProfile%

    Press enter

  • Hello, I have a new Mac Book Pro and I'm not sure how to use it. I just 'downloaded' Lightroom and it is not showing in my toolbar or on my desk... It shows a circle that says Lightroom 5.7.1 and when I click it it brings me to the ini

    Hello, I have a new Mac Book Pro and I'm not sure how to use it. I just 'downloaded' Lightroom and it is not showing in my toolbar or on my desk... It shows a circle that says Lightroom 5.7.1 and when I click it it brings me to the download process initiail... Help!

    Hello

    Please click on the first " Finder " icon on the dock (toolbar below) on your screen, in the left panel, you will see an option, click on 'Applications' on it.

    Under the present, you should be able to see Lightroom if it is properly installed.

    Let us know if that helps.

    Kind regards

    Bani

  • How many times can you use the serial number to download the cd

    can help how many times we use the serial number to download the photoshop elements 11 cd

    Download Photoshop Elements products | 10, 11, 12, 13

    Mylenium

  • I've got 4 Lightroom on the drive that is installed on my desktop Mac. I want to use it on a new MacBook with no disk drive. I can install it using the serial number of download? How?

    I've got 4 Lightroom on the drive that is installed on my desktop Mac. I want to use it on a new MacBook with no disk drive. I can install it using the serial number of download? If so, how?

    1. go to the following Web site and download the latest version of Lightroom 4:Adobe - Lightroom: for Macintosh: Adobe Photoshop Lightroom 4.4.1

    2. run the installation package to install Lightroom.

    3. use your existing serial number to activate the program.

  • How to use the concepts Advanced PL/SQL in oracle reports and forms

    Hi all

    Can anyone suggest me how to use the Concepts(nested tables,PAA,Varrays,Objects...) Advanced PL/SQL in Oracle forms.

    In fact, I created a Table whose column of type Varray. now, I want to create an element in oracle forms on this field. can anyone suggest me how to proceed.

    Thank you
    Kumar

    Hello

    Take a look at this one:
    http://SheikYerbouti.developpez.com/tutoforms10g/tutoforms10g.htm
    especially the chapter on the block that contains a collection of (2.3.3). The sample is built around a nested table, but you get the idea to adapt to work with a varray.

    Kind regards
    Alex

    If someone useful or appropriate please mark accordingly.

  • How to use the trial to design adobe? I was successful to install adobe download wizard

    How to use the trial to design adobe? I was successful to install adobe download wizard

    Once Adobe Download Assistant is installed, you can start at any time and choose a product to download at the bottom of the window. Updates list as new products will be available for download with Adobe Download Assistant.

    Please visit: http://helpx.adobe.com/x-productkb/policy-pricing/download-assistant-faq.html#main_How_do _ I_download_a_trial_version_of_Creative_Suite_or_Elements_software_

  • How to use the activity monitor to remove MegaBAckup on my mAc Book PRO?

    How to use the activity monitor to remove MegaBAckup on my mAc Book PRO?

    Download and run MalwareBytes. Malwarebytes was developed by one of our colleagues here to ASC. He received rave reviews and is on the more proven anti-malware for Mac software.

  • How to cut the great movie for download on YouTube

    In my Finder, in all the films, there is a video, I want to send on YouTube.  However, the original is very big at 1.64 GB (or at least that's what says "Get Info" in the Finder).  I already tried to divide the movie into 4 parts using the Trim function, but even in this case, each segment is between 300 and 420 MB each!

    Is there an easy way to divide the film into several parts, each of them being the maximum size accepted by YouTube?  I could call and then with part # s for download on YouTube. Not sure, but I think that YouTube has a max of 25 MB per upload to film?  So I guess I'll end up with way too many pieces, LOL.

    I could erase parts of the film strip, but I'm not familiar with the process and have "cut" never the movie of "front-end" or the "back-end" (well Yes, I said, I'm not an expert).   Bottom line: I want to get the movie in its entirety on YouTube somehow.

    All advice welcome.  The film is already 4 years old and I did not understand this in order to share with the family.

    R

    https://search.Yahoo.com/search?p=compressing%20video%20Files%20mac

    How about do your own research online for the You Tube tutorials for how to use the iMovie version you have on your OS X 10.6.8 iMac and how to edit clips make movies shorter and weaker in the size of the file.

    The discussions and the answers you need are too detailed tedious to cover in a forum for troubleshooting.

    A lot of YouTube videos for you help with your film questions of edition.

    You just need to look for the tutorial iMovie, you need.

    You had 4 years to do your own research on how to change your own created movies.

    YouTube has a lot of video tutorials to help you with this, and you can play these video the long while real using iMovie to make the tutorial!

    Good luck to you.

  • How to use the adapter wireless Satellite C660D?

    Hello world!

    Crazy us looking for the adapter wireless Satellite C660D-164... is there an integrated? or do I have to buy an external? Can not know how to set up a wi - fi and bluetooth connection. The manual is not descriptive.

    Installed all the drivers form the site.

    Pleas help ASAP.

    As far as I know all the portable toshiba have too much especially the bluetooth and WIRELESS network card.
    Use of WLAN is very simply. Thing the most important ist wireless network adapter must be installed and activated correctly.

    In the document s user manuals, you can find good description how to use the WLAN.

    The question is: do you use your laptop with the original operating system preinstalled that you got with it or you use own preloaded?

  • How to use the webcam

    I have an Acer laptop AS 5740, I'm useless with all the technology, can someone tell me how to use the web cam it please?

    Hello

    If it is a built-in webcam, the instructions for use of the device will vary between manufacturers.

    Your best resource for this information is Support of Acer.

    Here is a link to the product page for your computer. This page contains all the documentation for this system and devices.

    Acer support: downloads & Documents - Support Notebook / sucks / Aspire 5740:
    http://support.Acer.com/us/en/product/default.aspx?tab=2&modelId=1870

    If you cannot find the information in this location, use the following link to request to Acer.

    Acer Support - answers, E-Mail, Chat - find answers: http://acer.custhelp.com/app/answers/list

    Concerning

  • I use Windows 10 and use the Canon SX20 IS. How to use the function of Photo stich?

    I use Windows 10 and use the Canon SX20 IS. How to use the function of Photo stich?

    Is it possible to get the procedure to use feature stich photo?

    Will be Zoombrowser EX for windows 10 wotk?

    If any expert can guide me... that will be great.

    Hi Sat17,

    Thank you for your inquiry.

    For Windows 8 and beyond, ZoomBrowser EX has been replaced by EX. ImageBrowser

    Your software you will need to updated for Windows 10.

    You can access the software for your camera by clicking here.  Once on our site, scroll down to "Drivers and downloads", then use the drop down menu to choose "8.1 Windows" or "Windows 8.1 (x 64)".»  Your camera software has not been updated for Windows 10, but for Windows 8.1 software will run on your computer.

    To update your software, click the [Select] button to the right, then click on "How to download and install" for installation instructions.

  • How to use the license acquired from Win 7 cd to be used on my WinXP?

    Windows XP License Activation

    I have a copy of Windows XP on my PC where I tried registering online, he says that's not authentic. I bought a copy of Win7 with downgrade rights to Windows XP Pro. How to use the license acquired from Win 7 cd to be used on my WinXP? I could not afford a complete reinstallation because several drivers needed to work on my pc do not work with Win7.

    Thank you!

    Hello Emerson_1

    Microsoft does not sell Windows 7 with a downgrade to Windows XP and a valid key. You will need to provide your own key. This option is only available with OEM Windows 7 Professional systems. If you wish to continue using XP you will need 2 keys as indicated by JW.
    Windows 7 offers XP mode and you can use it if you have chosen.

Maybe you are looking for