Help!!! Upload Files using Applet.

I've built an upload application using html tag <input type="file" ...>. Both client and server's programs have been finished for a long time. However, my boss want to use applet replace html tag(due to some reasons). I want to build an applet which allow user to select multiple files and then upload. But I don't want to modify the server side program. May anyone teach me on how to upload the files which generate the page which is the same as the HTTP request? Thanks a lot.

No. You could sign the applet for granting the permission. Could anyone tell me how to generate the http request with contents and file inside?

Similar Messages

  • Upload http file using applet

    Hello every body,
    I am trying to upload the http file using applet. Can any body give me the hint or example.
    Thanks in advance
    best regards

    any of several libraries are out there that would let you to HTTP File Upload to a web server, assuming the web server has a servlet or other thing to accept the file.
    Of course, where you get the file might be a problem without a signed applet.

  • How to upload file using  *cl_gui_frontend_services* method

    hi
    i want to upload an image file using this method
    and i want to save it in MIME Repository (/SAP/BC/BSP/SAP/PRASHANT)
    DATA:
    itab TYPE TABLE OF sflight.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename                = 'C:\temp\winter.jpg'
        filetype                = 'ASC'
        has_field_separator     = '|'
      CHANGING
        data_tab                = itab
    IF sy-subrc = 0.
    WRITE:/ 'success'.
    ENDIF.
    So plz tel me how i set given path to upload file using this method .

    Hi Prashant,
    Go through the [Link|https://forums.sdn.sap.com/click.jspa?searchID=24477690&messageID=6684222].
    Hope this is helpful.
    Regards,
    Abhinav

  • Maximum size of upload file using Cross Domain Library

    Hi All 
    I need to know what is the maximum size of file that I can upload using Cross Domain Library from my Provider hosted app. I know that in msdn it is written that usign REST call we can upload upto 2GB but I have doubts if it is true with Cross domain library
    REST Calls. Please suggest.
     spExecutor.executeAsync(
                                   url: fileCollectionEndpoint,
                                   method: "POST",
                                   contentType: "application/json;odata=verbose",
                                   body: filedata,
                                   binaryStringRequestBody: true,
                                   headers: { "X-RequestDigest": $("#__REQUESTDIGEST").val(), "accept": "application/json;odata=verbose" ........
    And Can I pass ArrayBuffer directly or I need to pass only binary string ?
    Thanks in Advance 

    Hi,
    According to your post, my understanding is that you want to know the Maximum size of upload file using Cross Domain Library.
    Per my knowledge, you can upload files up to 2 GB with the REST API. 
    You can refer to:
    How to: Upload a file by using the REST API and jQuery
    In addition, you can pass ArrayBuffer directly. Please refer to:
    FileCollection methods
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Upload files using browser

    how is posible upload files using a browser (IE5) to BD ?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JuanCarlos HorrachCampins (jchorrach@globalia:
    how is posible upload files using a browser (IE5) to BD ?<HR></BLOCKQUOTE>
    The Form enctype=multipart/formdata and input type=file parameters are needed along with method=post.
    You then need a servlet(or MS PostingAcceptor) on the server side to read/store it. The Post data is in multiple parts with the parms on separate lines..
    Here is sample HTML Form:
    <HTML>
    <BODY>
    <H2>Uplaod test </H2>
    <form enctype="multipart/form-data" action="/examples/servlet/MultipartForm"
    METHOD="POST"
    NAME="UploadFileForm"
    LANGUAGE="JavaScript"
    onSubmit="if (!validateForm(document.UploadFileForm))
    alert ('Please enter a fileName.');
    document.UploadFileForm.my_file.select();
    return false;
    }">
    <input type="text" name="TargetURL" value="/uploads">
    <input type="text" name="submitter" value="me">
    <FIELDSET> <legend> FileUpload</legend>
    <BR>
    <table>
    <tr>
    <td align="left">Fully qualified Filename to upload:</td>
    </tr>
    <tr>
    <td align="left"><input name="file" type="file" size="50"></td>
    </tr>
    <tr>
    <td align="left"><input type="Submit" value="Upload File"></td>
    </tr>
    <table>
    </FIELDSET>
    </form>
    <SCRIPT LANGUAGE="JavaScript">
    // Begin client side helper functions
    function validateForm(form)
    if (isEmpty(form.file)) return false;
    return true;
    function isEmpty(textcontrol)
    str = textcontrol.value
    for (i = 0; i < str.length; i++)
    chr = str.substring(i, i + 1);
    if (chr != ' ')
    return false;
    return true;
    </SCRIPT>
    </BODY>
    </HEAD>
    null

  • Access a file using applets

    hello friends,
    i'm trying to access a file using applets but i'm getting security error.
    similar error for accessing the data base also so pls if you know help me how to access file/database using applets.

    You need to use a signed applet and know where the file is and in an accessable area; signing an applet will not allow you to go on a "fishing expedition" through the file system.

  • Upload File using MDS WCF API

    I have a field of File Type in my Entity. How can I upload file using WCF API?
    I tried to create a new Entity Member and added the following attribute in the member attributes collection
    Attribute att = new Attribute();
    att.Identifier = new Identifier();
    att.Identifier.Name = "Image";
    att.Value = bytes;
    In attribute value I tried to pass the bytes array of an image, also tried Encoding.ASCII.GetString(bytes); as attribute value, but none of them works.
    With byte array i get the following exception "Conversion failed when converting the nvarchar value 'System.Byte[]' to data type int." and in case of ASCII string i get "A database error has occurred. Contact your system administrator." error.
    There is lack of documentation and samples.
    Please let me know if someone tried it out.
    Thanks!

    You need to use the EntityMemberAttributesGet operation to retrieve the contents of a file attribute. EntityMembersGet is designed to retrieve a collection of many members and therefore it would not make sense to retrieve every file for every row retrieved.
    In contrast, EntityMemberAttributesGet is designed to work with a single member and specific attributes of that member, and it was designed to retrieve the file content.
    Val Lovicz
    http://www.profisee.com
    [email protected]
    As the original creators of Microsoft MDS, Profisee's Master Data Maestro provides a range of enterprise-grade functionality to ensure MDS project success.

  • Can i load a class in subdirectoy  inside a jar file using applet tag?

    hi every one.. thank you for reading ... i am really in dire need for the solution..
    my problem is that i have a jar file contianing a package which inturn contains my applet class...
    i am trying to access this applet class using a applet tag in html file. this html file is in same directory as the jar file. i am having no problems in windows but when i am doing this in linux apache server i was getting class not found exception. (already checked the file permissions). and when i am successful when using simple package directory instead of jar file . so gist of my quesition is "can i load a class in subdirectoy inside a jar file using applet tag in a html file"?

    When you tested in Windows were you using Internet Explorer? On Linux you will be using a different browser, usually Mozilla of some version, or Firefox. Note that the HTML tags for applets will be different between the browsers if you are using the object tag. Principally the classid value for the object tag will differ between Firefox and Internet Explorer.

  • Business Catalyst Help | Upload files to the site

    This question was posted in response to the following article: http://helpx.adobe.com/business-catalyst/sbo/upload-files-using-file-manager.html

    Hi Kevin,
    I assume that you have created your site through Muse. In this case, by default, File Manager is disabled to prevent the risk of accidental content overwrites since there is no roundtrip between Muse and the online editor.
    If you wish to enable the File Manager, edit your account settings (by clicking on your name on the top right corner and selecting My Details) and check the Enable online content editing box.
    This will enable several options into your menu, including the file manager.
    Cristinel

  • Can i open a file using applet?

    Hi,
    I try to open a file using applet.. but an error said "access denied(java.io.FilePermission tempecg.out, read) ...."
    tempecg.out is the file that I want to read.. below is part of my code.. what should I do...?
    currently the file is in my harddisk, next time will be linked using URL, will this be another problem?
    thanks!
    public void run()
    while (true)
    try
    LineNumberReader lr = new LineNumberReader(new FileReader("tempecg.out"));
    while (dv.size() < 240)
    int p = Integer.parseInt(lr.readLine().toString());
    //int p = (int)(Math.random() * 260);
    dv.add(new Point(0,p-130));
    Thread.sleep(2000);
    } catch (InterruptedException e) {}
    catch (IOException e) {}

    Hi pjustin1,
    you must use the policytool.exe given with JDK 1.2.x (or more).
    and with this tool you must add a permission on file (FilePermission) you want to access.
    Christophe.

  • Uploading Files Using InputFile Component -- Sometimes not working

    Hello,
    This is the 2nd time I make a post about it!
    Because I have more than 1 application using upload, and everything is correct! But it doesn't work as it should!
    You can check the original post here: Uploading Files Using InputFile Component - Sometimes not working
    I need a solution please!
    The only thing we can conclude is that it could be a bug from oracle !!! (???) But I talked with other people and they say that it works fine for them.
    There is one important thing: when we put a form to "Uses Upload = true" it seems that the page doesn't work very normal. For exemple: if you use a table in a form that uses upload the table get's "crazy".
    Thanks,
    JP

    I have now access to METALINK!
    I can find some problems and patches about inputFile but not mine! I will check better later!
    I think the problem is caused because of my framework!

  • Attempting to upload files using the zend _file_transfer system from cs5 training from the source. [was: Question for David Powers]

    I am attempting to upload files using the zend _file_transfer system from cs5 training from the source.
    On trying to upload to a remote server I am having trouble with the destination setting (C:/upload_test) in the example, please could you point me in the right direction for the an example of this setting for a remote file transfer
    Also do I have to construct a connection file to activate a Ftp file transfer?
    David Woolston

    >I am on windows platform
    Who is your host? When you checked your host path in your host control panel, what did it say?
    >i have assumed (may be incorrectly) that the purpose of the exercise was to upload to a remote site (ie my website)
    That is correct.
    >Of course that upload might take place on a computer that does not have DW installed (an internet cafe for example)
    That's irrelevant. DW is just the tool you are using to build your site. The site runs on your hosting accounts servers. This includes the php scripts you are working with.
    >I have uploaded all files necessary for the operation, when i click upload it returns no such directory exits.
    Do you have a url we can check? What destination are you specifying in zend code?
    >This made me suspect that I would need to construct a ftp file transfer connection file to satisfied username, password , connection address etc
    The exercise you are dealing with is using http file transfer. This has nothing to do with FTP. You do not need FTP for this, other than using it to move your source code from your local client to your server.

  • Uploading files using FTP(Linlyn class)

    I'm currently learning java right now on my own, and I'm having some trouble.
    I'm trying to upload a txt file using the linlyn class. How do you create a file then upload it on an applet?

    I'm currently learning java right now on my own, and I'm having some trouble.
    I'm trying to upload a txt file using the linlyn class. How do you create a file then upload it
    from an applet?

  • How can i upload file using ajax post request and jsp

    Hi
    this is my code files
    addPhoto.jsp
    <html>
    <head>
    <title>Add Photo</title>
    <script>
    var optionNo = 0;
    var i=1;
    var val=0;
    var file = 0;
    var exten = new Array(".jpg",".jpeg",".gif");
    function addValues()
         for(var i=0;i<5;i++)
              optionNo += 1;
              oNewOption = new Option();
              oNewOption.text = optionNo;
              oNewOption.value = optionNo;
              addSelect.add(oNewOption);
    function addBoxes()
         var str = "";
         var j=0;
         val = document.getElementById('addSelect').value;
         for(j=1; j<= val; j++)
              str = str + '<font size=3>file:' + j + '</font>';
              str = str + '<input type="file" id=filepath'+ j +' name=file'+ j + ' onchange="uploadFile(hidden'+ j + '.value)"><div id="result'+ j +'"></div>
              str = str + '<input type="hidden" name="hidden' + j + '" value=' + j +'>';
         document.getElementById('addPhoto').innerHTML = str;
    function uploadFile(value)
    var str = "filepath" + value;
    file = value;
    var param = document.getElementById(str).value;
    var parameter = "filepath=" + param;
    alert(parameter.length);
    if(checkValidity(param))
    var url = "uploadFile.jsp";
    if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
    } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    req.open("POST", url, true);
    req.setRequestHeader("Content-type", "multipart/form-data");
    //req.setRequestHeader("Content-length", parameter.length);
    req.setRequestHeader("Connection", "close");
    req.onreadystatechange = callback;
    req.send(null);
         else
              document.getElementById("result" + file).innerHTML = "upload .jpeg,.jpg,.gif Files Only";
    function callback() {
    if (req.readyState == 4) {
    updatepage(req.responseText);
    function updatepage(str){
         document.getElementById("result" + file).innerHTML = str;
    function checkValidity(str)
         var i=0;
         var j=0;
         var str1 = str.substring(str.lastIndexOf("."),str.length);
         alert(str1);
         for(i=0;i<exten.length;i++)
         if(str1.search(exten) != -1)
              j++;
              break;
         if(j>0)
              return true;
         else
              return false;
    </script>
    </head>
    <body onload="addValues()">
    <h5>Add Photo(s)</h5>
    <select id="addSelect" name="addSelect" onchange="addBoxes()">
    <option id="select" selected>Select</option>
    </select>
    <div id="addPhoto"></div>
    </body>
    </html>
    uploadFile.jsp
    <%@page import="java.io.*"%>
    <%
    /*try
    String contentType = request.getContentType();
         System.out.println(request.getMethod());
         System.out.println("Content type is :: " +contentType); 
         if ((contentType != null) && (contentType.indexOf("multipart/form-data") >= 0))
              DataInputStream in = new DataInputStream(request.getInputStream());
              DataInputStream in1 = in;
              int formDataLength = request.getContentLength();
    System.out.println(formDataLength);
              byte dataBytes[] = new byte[formDataLength];
              int byteRead = 0;
              int totalBytesRead = 0;
              while (totalBytesRead < formDataLength)
                   byteRead = in1.read(dataBytes, totalBytesRead, formDataLength);
                   totalBytesRead += byteRead;
              out.println("<br>totalBytesRead : " + totalBytesRead + " : formDataLength = " + formDataLength);
         } catch(Exception e) {
              e.printStackTrace();
         try
         String filePath = request.getParameter("filepath");
         System.out.println(filePath);
         File f= new File(filePath);
         String path = f.getName();
         String contentType = request.getContentType();
         System.out.println(contentType);
         //InputStream in = new FileInputStream(filePath);
         DataInputStream in = new DataInputStream(request.getInputStream());
         int formDataLength = request.getContentLength();
         System.out.println(formDataLength);
    byte[] buf = new byte[1024];
    OutputStream out1 = new FileOutputStream("c:/docs/" + path);
    int len;
    while ((len = in.read(buf)) > 0) {
    out1.write(buf, 0, len);
    in.close();
    out1.close();
         out.write("File Uploaded SucssesFully");
    catch(Exception e)
         e.printStackTrace();
         out.write("error while Writing File");
    %>
    the above code in request.getContentType() i am getting 0. I am not passing the content length. for the same application with out using Ajax i am
    getting the size of file... it is very very urgent for me.. pls help me out on this...
    Any one having the code on this pls mail me the code...
    my mail id ... [email protected]
    Regards
    Ashok Kumar

    Sure, you can upload a file, using a form input element of type file. You pick this up with a servlet, though you need a special request wrapper to sort out the multi-part request you get back that way (there's a suitable package on jakarta.apache.org/commons)
    The servlet decrypts the file and can pass the results to a JSP for display.
    Don't try to do the complicated stuff in a JSP, it all gets incredibly messy, and that's not what JSPs are for.

  • Unable to see the uploaded file using gos object

    Hi Experts,
    I uploaded the file to server by using the below code. But I am unable to see the uploaded file. Please help me out hot to view the uploaded files (list the file name and view the content) (i want to upload the file by getting the url as input and by clicking the button)
    Code to upload the file.
    DATA: wa_zqtc_gos_request TYPE zqtc_gos_request.
      DATA: l_attachment        TYPE swo_typeid.
      DATA: lo_gos_service      TYPE REF TO cl_gos_document_service.
      obj-objkey  = req_num.
      obj-objtype = objtype.
      CREATE OBJECT lo_gos_service.
      CALL METHOD lo_gos_service->create_attachment
        EXPORTING
          is_object     = obj
        IMPORTING
          ep_attachment = l_attachment.
    I tyied with this to view the files but the attachement link is disabled. (i want to view the files by clicking the icon-GOS icon in tool bar)
      DATA: wa_zqtc_gos_request TYPE zqtc_gos_request.
      DATA: l_attachment        TYPE swo_typeid.
      DATA: lo_gos_service      TYPE REF TO cl_gos_document_service.
      obj-objtype = objtype.
      obj-objkey = req_num.
      CREATE OBJECT manager
        EXPORTING
          is_object = obj
        EXCEPTIONS
          OTHERS    = 1.
    Please help me out how to view the file and list.
    thanks & regards
    T.Tamodarane
    Edited by: T.Tamodarane on Oct 23, 2009 9:55 AM
    Edited by: T.Tamodarane on Oct 23, 2009 9:56 AM

    Hi,
    Please post ur thred below:
    PL/SQL
    Regards
    Meher Irk

Maybe you are looking for

  • Creation of a new plant

    Hi Gurus, While creating a new plant in real time, is advisable to copy a standard plant or define a new plant ? Please give reasons. When a plant is copied what are the various parameters that are copied to the target plant ? Thanks & regards, Suren

  • Business connector installation error

    Dear community, I am trying to install bc 4.8 x64 on win2008 R2 x64 std ed.server (in vmware). When I run the installer (BCServer48_x64.exe or BCServerXpt48_x64) I get an error: >business connector install could not find a java virtual machine to loa

  • Cant get help off any one , too much messing about to get you tube to work what a load of sh...

    why has you tube stopped playing

  • MM pricing schema

    Hi Friends, Can anyone provide me a real good material but easy to understand how MM pricing schema works? I need to understand the functions, controls and dependancies of all the fields that are used in a schema. Thanks for your help. Rana

  • My ipad 2 won't fully restore, it stops at about 95%

    i went to update my ipad to 4.3.2 and it saif i had to restore it, and i have tried 4 times letting it go for about 2 hours each time, and it gets hung up when the bar is almost full, the same place each time, my itunes is current. i have talked to A