[b]Upload[/b] and [b]download[/b] files with uiXML

I have implemented upload and download files with uiXML
like in msg Re: How can I upload and download files with uiXML? but
it's don't work... I don't have the Errors, i don't find the file that was uploaded...
my web.xml :
<servlet>
<servlet-name>uix</servlet-name>
<servlet-class>oracle.cabo.servlet.UIXServlet</servlet-class>
<init-param>
<param-name>oracle.cabo.servlet.AbstractPageBroker</param-name>
<!-- <param-value>oracle.cabo.servlet.xml.UIXPageBroker</param-value> -->
<!-- And we'll use a custom page broker -->
<param-value>insiel.cpsg.M00.bean.UploadingPageBroker</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
testUpload.uix
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://xmlns.oracle.com/uix/controller">
<content>
<pageLayout xmlns="http://xmlns.oracle.com/uix/ui">
<contents>
<form name="uploadForm" usesUpload="true">
<contents>
<fileUpload name="uploadedFile"/>
<submitButton name="upload" text="Upload"/>
</contents>
</form>
</contents>
</pageLayout>
</content>
</page>
PageBroker
package insiel.cpsg.M00.bean;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import oracle.cabo.servlet.BajaContext;
import oracle.cabo.servlet.Page;
import oracle.cabo.share.util.MultipartFormItem;
import oracle.cabo.servlet.xml.UIXPageBroker;
* An extension of UIXPageBroker which stores all uploaded
* files in the temporary directory.
public class UploadingPageBroker extends UIXPageBroker {
* Override of AbstractPageBroker.doUploadFile() which saves
* all files to the temporary directory.
protected String doUploadFile(BajaContext context, Page page, MultipartFormItem item) throws IOException {
// Get the location of the file to create in the temp directory.
// Of course a real application probably wouldn't upload files to
// the temp directory - just using this contrived example to
// demonstrate basic uploading support.
File file = _getFile(context, item);
// Create a FileOutputStream. Of course, a real application would
// probably want to buffer the output
if (file != null) {
FileOutputStream out = new FileOutputStream(file);
item.writeFile(out); // Write out the file
out.close(); // Close up the output stream
// We can return a value here to add to the PageEvent
// if so desired.
return null;
// Gets the File for the item that we are uploading
private File _getFile(BajaContext context, MultipartFormItem item )  throws IOException {
String name = item.getFilename(); // Get the file name
if (name == null) return null; // If we don't have a file, bail...
// Get the path to the temporary directory
File dir = _getTempDir();
// Return the File object
return new File(dir, name);
// Returns the path to the temprary directory
private File _getTempDir() throws IOException {
// Get the temporary directory from the ServletContext
ServletConfig sConfig = getServlet().getServletConfig();
ServletContext sContext = sConfig.getServletContext();
File ff= (File) sContext.getAttribute("javax.servlet.context.tempdir");
System.out.println(ff.getAbsoluteFile());
if( ff == null ) {
throw new IOException( "Error in FileUploadFilter : No upload "+
"directory found: set an uploadDir init "+
"parameter or ensure the " +
"javax.servlet.context.tempdir directory "+
"is valid" );
return (File)sContext.getAttribute("javax.servlet.context.tempdir");
lease HELP me !!!

Please stick to 1 post per question.
Refer to:
Upload and Download with uiXML (very urgent)
Jeanne

Similar Messages

  • How to not append '.PART' to the file name of the currently downloading file, and just download the file with its normal filename

    In Windows, when Firefox (I'm currently using 7.0) downloads a file, it appends ''.PART'' to the file name of the currently downloading file and just renames it to its original file name after it finishes downloading.
    I sometimes like to watch a currently downloading video file, so it will be better if Firefox just downloads the file to its actual filename (like what Opera does), so I can easily double click the incompletely downloaded file and watch it with the video player assigned to that file extension, rather than the awkward ''Right click -> Open With -> Choose Default Program'' route with .part files.
    Does anyone know how to set Firefox to do this?

    It is possible that your anti-virus software is corrupting the downloaded files or otherwise interfering with downloading files by Firefox and prevents Firefox from renaming the .part file.
    Try to disable the real-time (live) scanning of files in your anti-virus software temporarily to see if that makes downloading work.
    See "Disable virus scanning in Firefox preferences - Windows"
    * http://kb.mozillazine.org/Unable_to_save_or_download_files

  • How can I upload and download files with uiXML?

    I want to implement upload and download files with uiXML. In some previouse topic I got answare to look in AbstractPageBroker class in JavaDOC. I did it but this is a very-very little resolution description for this problem. I think for developers YOU (UIX Team) must in very quick time to put some examples on the NET because this is a nice technology but with adecvate samplase and developers guide it will be dead very soon. I digging this forum for information. I see many many people have same problems about this technology. They like it and want to use and try but documentation is very very poor.
    WE WANT EXAMPLES and separate forum for UIX. I think it deserve this.
    If You have any more detailed documentation would be nice to put on the net. I have uixdemo.zip file but this is in very early fase of development. I downloaded it before fwe months. And now I can't find it anymore on youre site. What happend?

    Attila -
    I went back and re-read the JavaDoc for AbstractPageBroker and MultipartFormItem and put together the following sample PageBroker based on the description from the JavaDoc:
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletContext;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.share.util.MultipartFormItem;
    import oracle.cabo.servlet.xml.UIXPageBroker;
    * An extension of UIXPageBroker which stores all uploaded
    * files in the temporary directory.
    public class UploadingPageBroker extends UIXPageBroker
    * Override of AbstractPageBroker.doUploadFile() which saves
    * all files to the temporary directory.
    protected String doUploadFile(
    BajaContext context,
    Page page,
    MultipartFormItem item) throws IOException
    // Get the location of the file to create in the temp directory.
    // Of course a real application probably wouldn't upload files to
    // the temp directory - just using this contrived example to
    // demonstrate basic uploading support.
    File file = _getFile(context, item);
    if (file != null)
    // Create a FileOutputStream. Of course, a real application would
    // probably want to buffer the output
    FileOutputStream out = new FileOutputStream(file);
    // Write out the file
    item.writeFile(out);
    // Close up the output stream
    out.close();
    // We can return a value here to add to the PageEvent
    // if so desired.
    return null;
    // Gets the File for the item that we are uploading
    private File _getFile(
    BajaContext context,
    MultipartFormItem item
    // Get the file name
    String name = item.getFilename();
    // If we don't have a file, bail...
    if (name == null)
    return null;
    // Get the path to the temporary directory
    File dir = _getTempDir();
    // Return the File object
    return new File(dir, name);
    // Returns the path to the temprary directory
    private File _getTempDir()
    // Get the temporary directory from the ServletContext
    ServletConfig sConfig = getServlet().getServletConfig();
    ServletContext sContext = sConfig.getServletContext();
    return (File)sContext.getAttribute("javax.servlet.context.tempdir");
    In this sample, each uploaded file is simply saved in the temporary directory. You'll want to replace the code that creates the FileOutputStream for the uploaded file to use whatever OutputStream makes sense for your application.
    BTW - I used the following UIX page to test this out:
    <?xml version="1.0" encoding="UTF-8"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller">
    <content>
    <pageLayout xmlns="http://xmlns.oracle.com/uix/ui">
    <contents>
    <form name="uploadForm" usesUpload="true">
    <contents>
    <fileUpload name="uploadedFile"/>
    <submitButton name="upload" text="Upload"/>
    </contents>
    </form>
    </contents>
    </pageLayout>
    </content>
    </page>
    Hope this sample helps with the uploading part of your question. I'll see if I can provide a download sample in a later post.

  • Hey i have ios 4.3.5 on my ipad and i wanna update it to ios 5.1.1 and ive downloaded the file made by apple but every time i try to update it to ios 5.1.1 it allways says error 3194. can anyone help?

    hey i have ios 4.3.5 on my ipad and i wanna update it to ios 5.1.1 and ive downloaded the file made by apple but every time i try to update it to ios 5.1.1 it allways says error 3194. can anyone help?

    alanangert1 wrote:
    ... every time i try to update it to ios 5.1.1 it allways says error 3194. ...
    3194  = http://support.apple.com/kb/ts4451
    If the above Support Article does not resolve it... then you have a problem.
    Perhaps a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is required..
    Be sure to make an appointment first...
    Note:
    That error message may be indicative of the Device being Hacked / jailbroken.... If this is the case then you are on your own.
    Unauthorized modification of iOS...
    http://support.apple.com/kb/HT3743

  • My i pod touch was erased in the find my ipod app this has set my i pod where i cant do a thing but see a black screen with a rotating circle in the middle of the screen. i tryed to restore and itdosent download actual file to the i touch

    my i pod touch was erased in the find my ipod app this has set my i pod where i cant do a thing but see a black screen with a rotating circle in the middle of the screen. i tryed to restore and itdosent download actual file to the i touch and i cant do a thing with it please help me fix this and if thereis a way with out lossing my data would be great but however it can be done please let me know asap thank u.

    Take it to an Apple Store and they may take care of it for you.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101
     In Memory of Steve Jobs 

  • FM to create a folder in local directory and then download the file...

    hi...
    can some one help me with a FM which will create the folder mentioned in the file path and then download the file.
    Ex : if file path is 'C:\Try\file.txt'.
    if the foler 'Try' is not available then it should be created and then the file should be downloaded in it.

    Hi
    Use the FM GUI_DOWNLOAD
    It will create the folder in PC if it not exist. Then Download the data .
      CONCATENATE p_path    " Directory path        
                  l_file                " File name
                  '.TXT'
            INTO  l_file_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = l_file_path
          filetype                = 'ASC'
        TABLES
          data_tab                = i_source[]
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.

  • I have Elements 9 and cannot download NEF files from my new Nikon1 v1, any help appreciated

    I have Elements 0 and cannot download NEF files from my new Nikon1 V1, any help is appreciated.

    PSE 9 is too old for any of the versions of ACR that support the 1 V1. You have three options:
    1. Upgrade to PSE 10 or 11.
    2. Use the Nikon software to convert the raw files and send the resulting tiffs to PSE for further editing.
    3. Try the free Adobe DNG converter, and you should be able to open the resulting DNGs in your version of ACR.
    Windows:
    http://www.adobe.com/support/downloads/detail.jsp?ftpID=5486
    Mac:
    http://www.adobe.com/support/downloads/product.jsp?product=106&platform=Macintosh

  • Os Yosemite 10.10.3 slow download and wen download the file its corrupt

    OS Yosemite 10.10.3 to slow to download and wen download the file its corrupt, i cannot instal the update any advice or help ??

    If you have been trying to download from the App store then this may be the problem.
    try downloading from here, faster and more stable.
    OS X Yosemite 10.10.3 Combo Update
    but first before installing check that you're iPhoto is version 3.6.1
    if it is not this version try to update it
    after install of 10.10.3 new Photos app gets installed and if you didn't have the latest iPhoto version
    you will lose it, but your pictures will still be in your iPhoto library.

  • Firefox doesn't reconvert special characters in the file names when download a file with any special characters in the file name

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [/questions/815207]</blockquote><br>
    if i try to download a file with any special characters in file name (e.g. File_Name.pdf), it doesn't reconvert them from the "sanitize url" process and download the file an incorrect name (e.g. File%5FName.pdf).
    This is really annoying.
    Thank you for your patient

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * [[Troubleshooting extensions and themes]]

  • HT5701 Cannot download pdf files with Safari 6.0.4?

    Cannot download pdf files with Safari 6.0.4

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • How to get string (specified by line and column) from txt file with labview

    Hi everyone
    How to get string (specified by line and column) from txt file with labview
    thx 
    Solved!
    Go to Solution.

    As far as I know, a text file has no columns.  Please be more specific.  Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character?  You could the Read from Spreadsheet String function and set the delimiter to a space.  This will produce a 2D array of strings.  Then use index array and give the line number and column number.
    - tbob
    Inventor of the WORM Global

  • I made an in app purchase, but it hasn't downloaded, I have tried to restore purchases and deleting and re-downloading it still with no luck, can anyone help?

    I made an in app purchase, but it hasn't downloaded, I have tried to restore purchases and deleting and re-downloading it still with no luck, can anyone help?

    Hi there, The best thing I would do is contact the app maker!
    How to get in contact with makers:
    1. App Store Developer Website
    2. In App Contact Support (Some app's don't have this!)
    3. App Store Contact Email (I have not seem to have located the contact emails yet!)

  • During and after downloads, the file is not viewable in the download window. I can find the file later by going to Explore and selecting my documents/downloads.

    When I download a file the download window opens but not files are viewable. I cannot execute a file from this window. I can open the download file using Explorer and then execute the file from there. Why are the files not viewable.

    In the Finder,navigate to your projec folder. Look in the Shared Items folder. Is there a video ffile inside? Does it play intact?
    Russ

  • Upload material and contract data from file in CCM 2.0

    Hi guys,
    This might be a difficult one!
    We have the following situation in a Client:
    We are upgrading a Requisitite catalog (working with BBP 2.0)
    to a CCM 2.0 catalog.
    In Requisite, one can upload material- and contract data from a file (it is standard funcionality) into the database.
    We need to have the same kind of funcionality in CCM 2.0 because our client does not prefer to work with XI (which is the standard SAP solution in these cases).
    How can we accomplish this? maybe with some additional ABAP coding!
    Our client is not working with Vendor Catalogs but I´m trying to see if we can use a dummy vendor catalog to accomplish material upload in CCM2 form a CSV file.
    Anyone had to face this situation before?
    If so, please provide some clues how to do it?
    Thanks in advance,
    Aart

    SAP CATALOG CSV 2.0 <;>
    Defaults;EN
    Model
    Catalog;All;;All Catalog
    DataType;DATE;DATE;Date
    Characteristic;Z_ACTION;/CCM/NAME;false;Action
    Characteristic;/CCM/PRODUCT_ID;/CCM/ID;false;Part Number
    Characteristic;/CCM/SHORT_DESCRIPTION;/CCM/DESCRIPTION;false;Description
    Characteristic;Z_MATERIAL_TYPE;/CCM/ID;false;Material Type
    Characteristic;/CCM/MINIMUM_QUANTITY;/CCM/MINIMUM_QUANTITY;false;Order Unit
    Characteristic;Z_CONTENT;/CCM/MINIMUM_QUANTITY;false;Content
    Characteristic;/CCM/LEAD_TIME;/CCM/LEAD_TIME;false;Lead Time
    Characteristic;Z_SUPPLIER_ID;/CCM/ID;false;Supplier Number
    Characteristic;Z_SUPPLIER_NAME;/CCM/NAME;false;Sup Name
    Characteristic;Z_P_GROUP;/CCM/ID;false;Purchasing Group
    Characteristic;Z_P_ORG;/CCM/ID;false;Purchasing Org
    Characteristic;/CCM/CONTRACT_ID;/CCM/ID;false;Contract Number
    Characteristic;/CCM/CONTRACT_ITEM_ID;/CCM/ID;false;Contract Item
    Characteristic;/CCM/PRODUCT_GROUP;/CCM/ID;false;Product Category
    Characteristic;/CCM/PRICE;/CCM/PRICE;true;Price
    Characteristic;Z_DATE;DATE;false;Date
    Characteristic;/CCM/LONG_DESCRIPTION;/CCM/LONG_DESCRIPTION;false;Long Description
    Characteristic;/CCM/PICTURE;/CCM/ATTACHMENT;false;Picture
    Schema;All;Z_ACTION;Z_MATERIAL_TYPE;Z_CONTENT;Z_SUPPLIER_ID;Z_SUPPLIER_NAME;Z_P_GROUP;Z_P_ORG;Z_DATE;All Schema
    Category;10000300;;;ABC
    Category;10000400;;;DEF

  • Hi why are my photos after downloading twice ,once in photo library and once in a file with the date why cant i delete a file its an iphone 4s please help

    why are my photos after downloadon twice one as photo library the other as a file with date how can i delete one file same pics

    Generally I would not use Facebook for sharing any photos, it compresses the photos substantially, and when you have shadows and dark colours you get visible "bands" where there should be subtle gradients, ie at sunsets and sunrises.
    It sounds like you are using two methods to upload to Facebook:
    1. Sharing from within Aperture, which basically syncs Facebook with your Aperture album, so any changes made at either end gets synced, hence the deletions from Albums, although the original file should still be in your library, just removed rom the album. It is like a playlist in iTunes.
    2. Exporting pics and uploading to Facebook from the browser.
    I am not sure how method 1 gets compressed, but I know that uploading hi-res jpegs to Facebook using method 2 results in poor quality images.
    I wouldn't even bother comparing option 1 or 2, and they will both be poor images once you view them on Facebook, as opposed to viewing uploaded images on proper image sharing / hosting sites.
    Your problem is not with Aperture, it is using Facebook for showing your work.
    If you export pics form Aperture at high res jpegs or TIFFs your images will be fine.
    If you insist to use Facebook as your way to share your work, then your workflow should be this:
    1. Right click images you want to share.
    2. Select Export version.
    3. Export as 100% size and ensure the export settings are set at 100% quality.
    4. Upload this pic into Facebook.
    This will get you the best image size and resolution on Facebook.
    See how you go.

Maybe you are looking for

  • DECODE QUESTION

    I have 4 columns that I want to test for the existance of a value greater than 0 in order of last to first and then return the value of the first column found that has a value > 0. I have columns discount_2,discount_1,supplier_2 and supplier_1. When

  • ALV REPORT PROGRAMMING

    HI I AM NEW TO ABAP..CAN ANYONE PROVIDE WITH A STEP BY STEP GUIDE TO ALV PROGRAMMING AND MODULE POOL PROGRAMMING

  • AVCHD clips imported in FCE play way too fast.

    Hi there, I am a video newbie, I am trying to import AVCHD clips from an SDHC card into FCE using log and transfer method. All is well until I start working on the clip in the viewer, the clip is for sure playing at 2X speed, I am not sure why. It mi

  • Find my iphone screen showing my macbook as locked

    I recently sold my macbook pro on ebay It was delivered today to the buyer. I forgot to remove my icloud from the macbook I have been on my Icloud account and the macbook shows up as being at the persons home address. This all well and good which sho

  • Baisc Aqualogic Interaction SSO mechanism

    I have a basic question on how the aqualogic interaction SSO works. I see an Authentication SOurce SSO, but i dont understand which repository it connects to. How it generates the Login Token. Can i use the features of authentication service outside