Urgent: Upload a file

I want to write a program that uploads files.
The user first choose one file and click "upload". The uploaded file will then be displayed in a list in the SAME page. If he wants to upload more, he can repeat the above processes.
The user finally sends out and proceeds.
Do anyone has suggestion? I would greatly appreciate your kind help!

Use http://www.jspsmart.com -- look for jspSmartUpload there.
I tested them all, every single file upload handler - This is the best !

Similar Messages

  • Urgent - Upload a file from Client to Server.

    Need to load a file from the client machine to the Server running 9iAS Rel. 1 on a HP Unix Machine.
    We are using Forms 6i. We have looked into the File Upload Utility demo code provided with Forms 6i - but have been unsuccessful in reusing it. PLS HELP

    Duplicate post.
    Upload a file from client to server by forms in E-Bussiness Suite R12
    Re: Upload a file from client to server by forms in E-Bussiness Suite R12.

  • Urgent - Uploading a file from HTML

    How to dynamically set the value of a file (full path of the file with filename) to the tag input type=file?
    In the usual scenario the user will select the file from the "Browse" button. Is this possible to set the value without choosing from "Browse" button?

    Urgent? You were in so much of a hurry, you didn't notice you posted a question about HTML in a Java programming forum.

  • Urgent: Uploading file, cannot receive InputStream SocketTimeOutException

    Hey everyone,
    I am going crazy with this. We have a server that supprots HTTP1.1 and Transfer-Encoding: chunked.
    We have written a mobile app that uploads a file to the server using URLConnection. Due to low memory on the phone we do not want to buffer all data and send it in once erquest. Instead we want it to be streamed through.
    We found out that Transfer-encoding: chunked does this. It actually works, we can see the network data being streamed while its being read.
    The problem starts after the file has been sent. We are unable to retrieve the InputStream. We get a SocketTimeoutException.after requesting the InputStream.
    InputStream is = httpConn.getInputStream(); //This line causes the timeout.
    It seems as if the server DOES NOT KNOW we are done sending the file? We read the documentation for chunked send and according to wikipedia we have to add a zero-size chunk at the end.
    We have tried adding this but still we are getting this exception. Not sure if we tried it correctly though.
    Can anyone please help? This is very urgent.
    Thank you,
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    PrintStream pout = new PrintStream(buffer, true, "ISO-8859-1");
    pout.print("--" +boundary);
    for (String[] arg : pars) {
    pout.print(LINE_BREAK);
    pout.print("Content-Disposition: form-data; name=\""+ arg[0] +"\"");
    pout.print(LINE_BREAK+ LINE_BREAK);
    pout.print(arg[1]);
    pout.print(LINE_BREAK);
    pout.print("--" +boundary);
    pout.print(LINE_BREAK);
    pout.print("Content-Disposition: form-data; filename="+ URLEncoder.encode(fileName));
    pout.print(LINE_BREAK);
    pout.print("Content-Type: " +mimeType);
    pout.print(LINE_BREAK+ LINE_BREAK);
    pout.close();
    con.connect();
    OutputStream out = con.getOutputStream();
    out.write(buffer.toByteArray());
    out.flush();
    byte[] buf = new byte[2048];
    int read;
    long processed = 0;
    while ((read = data.read(buf)) > 0) {
    if (isCancelled()) {
    out.close();
    return;
    / *DATA GETS SEND HERE ONLY IF WE SET Transfer-Encoding: chunked OR USE setChunkedStreamingMode(xxxx);* /+ --+
    out.write(buf, 0, read);+ --+
    processed+ --+= read;
    publishProgress((int) (100 * processed / fileLength));
    out.write(ending);
    out.close();
    }aBs
    Edited by: aBsOlUtJava on Jul 2, 2009 3:36 PM
    Edited by: aBsOlUtJava on Jul 2, 2009 3:40 PM
    Edited by: aBsOlUtJava on Jul 2, 2009 3:40 PM

    Hey,
    Sorry I wrapped the code in tags. Yes I have tried using the Content-Length header.
    If I avoid getting the InputStream the upload works, but I want to get the InputStream to read the servers response as some files can be rejected.
    Please see: http://en.wikipedia.org/wiki/Chunked_transfer_encoding, it says something a zero-chunk at the end. Is the reason perhaps that the server does not know my upload and request is done?
    I apologize for the urgent mark, I have been trying for 48 hours on this and I am going crazy =(                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • URGENT: Is it possible to upload multiple files using STRUTS

    Hi,
    Is it possible to upload multiple files using STRUTS.
    I am able to upload a single file. But how do i upload multiple files ??
    upload.jsp
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html>
    <head>
    <title>New Page 1</title>
    </head>
    <body>
    <html:form action="/secure/uploadFile.do" enctype="multipart/form-data" method="POST" type="com.smartstream.webconnect.user.actions.UploadActionForm">
    <p>File to upload
    <html:file property="fileUpload" size="20"/></p>
    <p><html:submit/></p>
    </html:form>
    </body>
    </html:html>
    UploadAction.java
    public class UploadAction extends BaseAction {
        Logger log = Logger.getLogger(AttachMessageAction.class);
        public ActionForward executeAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ActionException {
            System.out.println("executeAction of UploadAction");
            UploadActionForm uploadActionForm = (UploadActionForm) form;
            int fileSize = uploadActionForm.getFileUpload().getFileSize();
            System.out.println("uploadActionForm.getFileUpload().getFileSize() = " + uploadActionForm.getFileUpload().getFileSize());
            byte buffer[] = new byte[1024];
            try {
                BufferedInputStream bufferedInputStream = new BufferedInputStream(uploadActionForm.getFileUpload().getInputStream());
                FileOutputStream fos = new FileOutputStream("s:\\uploaded\\" + uploadActionForm.getFileUpload().getFileName());
                int read;
                while ( (read = bufferedInputStream.read(buffer,0,buffer.length)) != -1) {
                    fos.write(buffer, 0, read);
                fos.flush();
                fos.close();
                bufferedInputStream.close();
                return mapping.findForward("success");
            } catch (IOException e) {
                e.printStackTrace();
                return mapping.findForward("error");
            }catch(OutOfMemoryError o){
                o.printStackTrace();
                System.out.println("o.getMessage() " + o.getMessage());
                return mapping.findForward("error");
    UploadActionForm.java
    public class UploadActionForm extends ActionForm{
        private FormFile fileUpload;
        private byte[] fileContent;
        public FormFile getFileUpload() {
            org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0;
            return fileUpload;
        public byte[] getFileContent() {
            return fileContent;
        public void setFileUpload(FormFile fileUpload) {
            this.fileUpload = fileUpload;
        public void setFileContent(byte[] fileContent) {
            this.fileContent = fileContent;
    }--Bhupendra Mahajan

    Yes, you could try using the multipart handler...
    But I have a better idea...
    Determine the maximum number of file uploads that the
    user can do at one time. I mean, you can't
    realistically have the user upload a million files at
    one time. So say the max is 20. So you create your
    action form class with 20 FormFile fields called file1
    to file20.
    Then when you dynamically create your page, you
    dynamically create the specified number of file fields
    and 1 hidden field called "totalFiles" which contains
    the number of file fields you created. This should be
    an int field in the form bean.
    Then when you do your action processing, you just loop
    thru the totalFiles... Or well, actually, you may not
    need that at all. You could just check all the
    FormFile fields and whatever ones aren't null contain
    files.But what about UploadActionForm.java[b]
    How do i have exact mapping of the HTML form in this file ??
    --[b]Bhupendra Mahajan

  • Upload a file without a browser ! VERY URGENT

    Hi all,
    i have to upload a file calling a servlet from a standalone client; inside the servlet i use the component FileUpload from Apache.
    I found some example how to send the data using HttpUrlConnection class but it seems that the file parameter i try to send to Servlet is not recognize so everytime i get an error which says that in the request there no parameters.
    Any good suggestion ?
    Cheers.
    Stefano

    I GOT the solution ! please check my last message out with subject : "This the solution of my problem"
    Cheers.
    Stefano

  • To upload a file from client machine to server machine

    Hi everybody!
    Could anyone plz help me. I am struck in a problem
    I want to transfer a file from client's machine to server but I am not able to upload
    It is tranferring the file only to the local machine
    I am using orielley package It is transferring files only to my local machine but not to the server .Can anyone correct it. It's very urgent
    how to write the relative path for server
    I am using this path and it is not uploading
    MultipartRequest multi = new MultipartRequest(request, "../<administrator>:<dev2daask>@dev2:C:/123data/", 5 * 1024 * 1024);
    Here is my code:
    <%@ page import="java.util.*" %>
    <%@ page import="javax.servlet.*" %>
    <%@ page import="javax.servlet.http.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="com.oreilly.servlet.MultipartRequest"%>
    <%
    try {
    // Blindly take it on faith this is a multipart/form-data request
    // Construct a MultipartRequest to help read the information.
    // Pass in the request, a directory to saves files to, and the
    // maximum POST size we should attempt to handle.
    // Here we (rudely) write to the server root and impose 5 Meg limit.
    MultipartRequest multi = new MultipartRequest(request, "../<administrator>:<dev2daask>@dev2:C:/123data/", 5 * 1024 * 1024);
    out.println("<HTML>");
    out.println("<HEAD><TITLE>UploadTest</TITLE></HEAD>");
    out.println("<BODY>");
    out.println("<H1>UploadTest</H1>");
    // Print the parameters we received
    out.println("<H3>Params:</H3>");
    out.println("<PRE>");
    Enumeration params = multi.getParameterNames();
    while (params.hasMoreElements()) {
    String name = (String)params.nextElement();
    String value = multi.getParameter(name);
    out.println(name + " = " + value);
    out.println("</PRE>");
    // Show which files we received
    out.println("<H3>Files:</H3>");
    out.println("<PRE>");
    Enumeration files = multi.getFileNames();
    while (files.hasMoreElements()) {
    String name = (String)files.nextElement();
    String filename = multi.getFilesystemName(name);
    String type = multi.getContentType(name);
    File f = multi.getFile(name);
    out.println("name: " + name);
    out.println("filename: " + filename);
    out.println("type: " + type);
    if (f != null) {
    out.println("length: " + f.length());
    out.println();
    out.println("</PRE>");
    catch (Exception e) {
    out.println("<PRE>");
    out.println("</PRE>");
    out.println("</BODY></HTML>");
    %>

    you have not understood my point
    how does this code will run on servlet when I want to upload a file from client's
    machine to server machine
    what I am doing is I am giving an option to the user that he/she can browse the file and then select any file and finally it's action is post in the jsp form for which I have sent the code
    All the computers are connected in LAN
    So how to upload a file from client's machine to server's machine
    Plz give me a solution

  • Error while uploading text file....

    Halo Friends,
    I am uploading 4 text files which contain three columns separated by a tab, but when i am trying to upload those files using WS_UPLOAD Function Module i am getting a runtime error saying 'error while uploading/downloading'.
    Please solve this problem as soon as possible.
    Thanks in Advance,
    rama

    Halo again,
    Now that i am able to upload the files, i need to update the database table the update statement is executing correctly but when i debug i see that the sy-subrc value is 4 but not 0.
    and hence the it is not committed.
    Any suggestions. i am pasting my code here for your reference:
    Tables: qmfe.
    data: begin of gt1_qmfe occurs 0,
          qmnum       like qmfe-qmnum,
          fenum       like qmfe-fenum,
          /itml/usr20 like qmfe-/itml/usr20,
          end of gt1_qmfe.
    data: begin of gt2_qmfe occurs 0,
          qmnum       like qmfe-qmnum,
          fenum       like qmfe-fenum,
          /itml/usr21 like qmfe-/itml/usr21,
          end of gt2_qmfe.
    data: begin of gt3_qmfe occurs 0,
          qmnum       like qmfe-qmnum,
          fenum       like qmfe-fenum,
          /itml/usr19 like qmfe-/itml/usr19,
          end of gt3_qmfe.
    data: begin of gt4_qmfe occurs 0,
          qmnum       like qmfe-qmnum,
          fenum       like qmfe-fenum,
          /itml/usr07 like qmfe-/itml/usr07,
          end of gt4_qmfe.
    data: gs1_qmfe like line of gt1_qmfe,
          gs2_qmfe like line of gt2_qmfe,
          gs3_qmfe like line of gt3_qmfe,
          gs4_qmfe like line of gt4_qmfe.
    data: ls_lines1 type i,
          ls_lines2 type i,
          ls_lines3 type i,
          ls_lines4 type i.
    parameters: ip_file1 type RLGRAP-FILENAME default 'C:\Urgent\TextFiles\StoDt.txt'     obligatory,
                ip_file2 type RLGRAP-FILENAME default 'C:\Urgent\TextFiles\RcDtCust.txt'  obligatory,
                ip_file3 type RLGRAP-FILENAME default 'C:\Urgent\TextFiles\DockDate.txt'  obligatory,
                ip_file4 type RLGRAP-FILENAME default 'C:\Urgent\TextFiles\AWB.txt'       obligatory.
    field-symbols: <fs1> like gs1_qmfe,
                   <fs2> like gs2_qmfe,
                   <fs3> like gs3_qmfe,
                   <fs4> like gs4_qmfe.
    perform upload_gt1_qmfe.
    perform upload_gt2_qmfe.
    perform upload_gt3_qmfe.
    perform upload_gt4_qmfe.
    perform update_qmfe.
    *&      Form  upload_gt1_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM upload_gt1_qmfe .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = ip_file1
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = gt1_qmfe.
    describe table gt1_qmfe lines ls_lines1.
    write: / ls_lines1.
    ENDFORM.                    " upload_gt1_qmfe
    *&      Form  upload_gt2_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM upload_gt2_qmfe .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = ip_file2
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = gt2_qmfe.
    describe table gt2_qmfe lines ls_lines2.
    write: / ls_lines2.
    ENDFORM.                    " upload_gt2_qmfe
    *&      Form  upload_gt3_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM upload_gt3_qmfe .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = ip_file3
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = gt3_qmfe.
    describe table gt3_qmfe lines ls_lines3.
    write: / ls_lines3.
    ENDFORM.                    " upload_gt3_qmfe
    *&      Form  upload_gt4_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM upload_gt4_qmfe .
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
       FILENAME                      = ip_file4
       FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                      = gt4_qmfe.
    describe table gt4_qmfe lines ls_lines4.
    write: / ls_lines4.
    ENDFORM.                    " upload_gt4_qmfe
    *&      Form  update_qmfe
          text
    -->  p1        text
    <--  p2        text
    FORM update_qmfe .
    data ls_cnt type i.
    loop at gt1_qmfe assigning <fs1>.
    update qmfe set    /itml/usr20 = <fs1>-/itml/usr20
                where  qmnum       = <fs1>-qmnum
                and    fenum       = <fs1>-fenum.
    if sy-subrc = 0.
    commit work.
    add 1 to ls_cnt.
    endif.
    endloop.
    write: / ls_cnt.
    ENDFORM.                    " update_qmfe

  • How to upload a file in BPEL Console Using JSP in JDeveloper, please help..

    Please I am new to Jdeveloper and to BPEL Process of OASuite,I want to know , how to upload a file in BPEL process using JSP in Jdeveloper IDE.
    The main aim is first we need to upload a file in JSP , it has to go to BPEL Process & it has to read the file & write the respective file in return to JSP through BPEL Process. Please I am in Urgent need of the Query , please help me ASAP.
    Send to me response Please.....................................

    Hi,
    I thin that you asked the same question before and I premember that I ointed you to the ADF BC developer guide and the SRDemo if your application uses JSF. For plain JSP - if you Google for: JSP and file upload then you find plenty of sources for JSP and Struts.
    The remaining part is how to stiff the file into a BPEL service on the middle tier. For this I recommended to ask your question on the BPEL forum
    BPEL
    Note that the BPEL integration would be easier if it was done on the middle tier and not onthe client
    Frank

  • How to Upload a file to KM Content repository from a Portal Application

    Hello All
    I have a urgent requirement where i have to upload a file to a KM Content Repository from my Portal Application which is a JSP DynPage Component..
    I am new to the area of Knowledge Management...Can anyone guide me of how to achieve this functionality from my component..
    I will be highly obliged..
    Thanks
    Sundeep

    Hello Sundeep,
    Check this:
    https://www.sdn.sap.com/irj/sdn/thread?threadID=241883
    One more important doc:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5f7ced90-0201-0010-589f-8eff15a14072
    Sample coding for content creating and retrieval
    String out = new String(“my content”);
    ByteArrayInputStream data = new
    ByteArrayInputStream(out.getBytes());
    IContent newContent =
    new Content(data, “text/plain”,
    data.available());
    resource.updateContent(newContent);
    IContent oldContent = resource.getContent();
    Greetings,
    Praveen Gudapati
    p.s. Points are always welcome for helpful answers
    Message was edited by:
            Praveen Gudapati

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Uploading csv file with number type data to database using apex

    hi
    am trying to upload csv file to oracle database using apex when i select the file using file browser and click on the button.
    my table looks like
    coloumn type
    col1 number(2)
    col2 number(2)
    col3 number(2)
    col4 number(2)
    please tell me the steps i need to follow
    urgent requirement

    This thread should help - Load CSV file into a table when a button is clicked by the user

  • Upload Image Files into IFS

    Dear Members,
    I am trying to upload files from my local disk to the IFS. There is no problem about uploading txt files. But i could not upload the image files like ".tif".
    Is there anyone who can help me urgently please?
    Here is the part of my source code..
    DocumentDefinition newDocDef = new DocumentDefinition(ifsSession);
    newDocDef.setName(filename);
    newDocDef.setContentPath(localpath);
    newDocDef.setAddToFolderOption(runtime);
    Document doc = (Document)ifsSession.createPublicObject(newDocDef);

    Dear Sir,
    This topic is very urgent for me, and I will be very happy for your help.
    I have changed my code like this.
    ClassObject co = classUtils.lookupClassObject("DOCUMENT");
    Collection c = ifsSession.getFormatExtensionCollection();
    Format f = (Format) c.getItems("tif");
    DocumentDefinition newDocDef = new DocumentDefinition(ifsSession);
    newDocDef.setContentPath(localpath);
    newDocDef.setAddToFolderOption(runtime);
    newDocDef.setName(filename);
    newDocDef.setClassObject(co);
    newDocDef.setFormat(f);
    TieDocument doc = (TieDocument)ifsSession.createPublicObject(newDocDef);
    And the error message is here.
    oracle.ifs.common.IfsException:
    IFS-30002: Unable to create new LibraryObject oracle.ifs.common.IfsException:
    IFS-32225: Error storing reference to content object 22,432 in media InterMediaBlob java.sql.SQLException:
    ORA-00911: invalid character
         void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)           DBError.java:187      void oracle.jdbc.ttc7.TTIoer.processError()           TTIoer.java:241      void oracle.jdbc.ttc7.Oall7.receive()           Oall7.java:543      void oracle.jdbc.ttc7.TTC7Protocol.doOall7(byte, byte, int, byte[], oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int, oracle.jdbc.dbaccess.DBType[], oracle.jdbc.dbaccess.DBData[], int)           TTC7Protocol.java:1477      int oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(oracle.jdbc.dbaccess.DBStatement, byte, byte[], oracle.jdbc.dbaccess.DBDataSet, int, oracle.jdbc.dbaccess.DBDataSet, int)           TTC7Protocol.java:888      void oracle.jdbc.driver.OracleStatement.executeNonQuery(boolean)           OracleStatement.java:2004      void oracle.jdbc.driver.OracleStatement.doExecuteOther(boolean)           OracleStatement.java:1924      void oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout()           OracleStatement.java:2562      int oracle.jdbc.driver.OraclePreparedStatement.executeUpdate()           OraclePreparedStatement.java:452      boolean oracle.jdbc.driver.OraclePreparedStatement.execute()           OraclePreparedStatement.java:526      boolean oracle.ifs.server.S_LibrarySession.execute(java.sql.PreparedStatement)           S_LibrarySession.java:14518      oracle.sql.BLOB oracle.ifs.server.S_MediaBlob.createBlobReference(java.lang.Long, java.lang.String)           S_MediaBlob.java:398      java.io.OutputStream oracle.ifs.server.S_MediaBlob.getOutputStream(java.lang.Long, java.lang.String)           S_MediaBlob.java:240      java.io.OutputStream oracle.ifs.server.S_MediaBlob.getOutputStream(java.lang.Long)           S_MediaBlob.java:225      java.lang.Long oracle.ifs.server.S_Media.setContentStream(java.io.InputStream)           S_Media.java:1741      void oracle.ifs.server.S_Media.setContent(oracle.ifs.server.S_LibraryObjectDefinition)           S_Media.java:1680      void oracle.ifs.server.S_ContentObject.setContent(oracle.ifs.server.S_LibraryObjectDefinition)           S_ContentObject.java:402      void oracle.ifs.server.S_ContentObject.extendedPreInsert(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_ContentObject.java:239      void oracle.ifs.server.S_LibraryObject.preInsert(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_LibraryObject.java:1644      oracle.ifs.server.S_LibraryObjectData oracle.ifs.server.S_LibraryObject.createInstance(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_LibraryObject.java:2711      oracle.ifs.common.AttributeValue oracle.ifs.server.S_LibrarySession.createSystemObjectInstance(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_LibrarySession.java:8365      void oracle.ifs.server.S_Document.setContentObject(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition, oracle.ifs.server.S_ContentQuota, boolean)           S_Document.java:475      void oracle.ifs.server.S_Document.extendedPreInsert(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_Document.java:313      void oracle.ifs.server.S_LibraryObject.preInsert(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_LibraryObject.java:1644      oracle.ifs.server.S_LibraryObjectData oracle.ifs.server.S_LibraryObject.createInstance(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_LibraryObject.java:2711      oracle.ifs.server.S_LibraryObject oracle.ifs.server.S_LibrarySession.newLibraryObject(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_LibrarySession.java:8159      oracle.ifs.server.S_PublicObject oracle.ifs.server.S_LibrarySession.newPublicObject(oracle.ifs.server.OperationState, oracle.ifs.server.S_LibraryObjectDefinition)           S_LibrarySession.java:8200      oracle.ifs.server.S_PublicObject oracle.ifs.server.S_LibrarySession.newPublicObject(oracle.ifs.server.S_LibraryObjectDefinition)           S_LibrarySession.java:8182      oracle.ifs.server.S_LibraryObjectData oracle.ifs.server.S_LibrarySession.DMNewPublicObject(oracle.ifs.server.S_LibraryObjectDefinition)           S_LibrarySession.java:7841      oracle.ifs.server.S_LibraryObjectData oracle.ifs.beans.LibrarySession.DMNewPublicObject(oracle.ifs.server.S_LibraryObjectDefinition)           LibrarySession.java:8015      oracle.ifs.beans.PublicObject oracle.ifs.beans.LibrarySession.NewPublicObject(oracle.ifs.beans.PublicObjectDefinition)           LibrarySession.java:5373      oracle.ifs.beans.PublicObject oracle.ifs.beans.LibrarySession.createPublicObject(oracle.ifs.beans.PublicObjectDefinition)           LibrarySession.java:2985 Process exited with exit code 0.

  • Error in uploading a file in server

    Hi,
    We are working in a application whose technologies are Flex 4.0 and .Net 2010.
    We are using .Net WCF Service for interacting with backend from the Flex front end.
    In our application, we have requirement to upload a file from the client into a server.
    We faced the following issue,
    Security violation Issue #2032.
    Solution: We have found that there is a sandbox restriction to access other domains, then we have placed the crossdomain.xml, which resolves the issue.
    But this solution works only in the IE.
    We are still getting the same error (Error #2032: Stream Error.) in other browsers - FireFox, Chrome and Safari.
    Please let us know if there are any suggestions or solutions for this issue.
    Regards,
    Guru

    Siva,
    You must apply modifiable binary type in wdDoInit of controller:
    ISimpleType stype =
      wdContext
        .node<YourNode>()
          .getNodeInfo()
            .getAttribute("FileResource")
              .getModifiableSimpleType();
    IWDModifiableBinaryType mtype = (IWDModifiableBinaryType)stype;
    /* Optional steps: affects only FileDownload control */
    /* mtype.setMimeType( WDWebResourceType.JPG_IMAGE);  */
    /* mtype.setFileName( "picture.jpg" );               */
    Sure, to make above work you must use binary type in context designer.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • How to upload a file in application server to an internal table

    Hi,
          I am asked to upload a file from application server to internal table. Can you please suggest me the ways to do it or the function module which helps to browse the application server file names.
      I have done a program. But its giving problem in searching the files from application server. I am pasting my code for ur review. Please tell me which part i have to correct or suggest me some other ways to do it.
    *& Report  ZUPLOAD1
    REPORT  ZUPLOAD1.
    type-pools: truxs.
    parameters: p_upl_ps radiobutton group g1 default 'X', "upload from pres. server
                 p_path type rlgrap-filename, 
                 p_upl_as radiobutton group g1,   "upload from appln server
                 <b>p_dir LIKE filepath-pathintern DEFAULT 'Y_ABAP', 
                 p_file LIKE filepath-pathintern lower case,</b>      
                 p_test as checkbox.
    constants: c_x value 'X',
               c_tab type c value cl_abap_char_utilities=>horizontal_tab.
    types: ty_data(1000) type c.    "structure to hold legacy data
    data: i_data type standard table of ty_data. "internal table of ty_data
    types: begin of stritab,
          land1 type v_t604-land1,  "structure of legacy file.
          stawn type v_t604-stawn,
          bemeh type v_t604-bemeh,
          impma type v_t604-impma,
          minol type v_t604-minol,
          end of stritab.
    data: gi_itab type standard table of stritab, "internal table of legacy file
          gw_itab type stritab.  "work area
    data: i_raw type truxs_t_text_data,
          v_fullpath type string.
    at selection-screen on value-request for p_path.
    if p_upl_ps = c_x. "if presentation server is selected
    perform get_file.
    else.            "if application server is selected
    perform set_file_path.      
    perform upload_from_server.
    perform split_data.
    endif.
    form get_file.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
      PROGRAM_NAME        = SYST-CPROG
      DYNPRO_NUMBER       = SYST-DYNNR
      FIELD_NAME          = ' '
    IMPORTING
       FILE_NAME           = p_path.     "getting the file name of pres server
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
      EXPORTING
      I_FIELD_SEPERATOR          =
        I_LINE_HEADER              = 'X'              "converting excel to sap and filling in
        I_TAB_RAW_DATA             = i_raw      "internal table
        I_FILENAME                 = p_path
      TABLES
        I_TAB_CONVERTED_DATA       = gi_itab
    EXCEPTIONS
       CONVERSION_FAILED          = 1
       OTHERS                     = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.
    form set_file_path.                 "Getting the file path of application server
    data: lv_file type p_file.
          lv_file = p_file.
          CALL FUNCTION 'FILE_GET_NAME_USING_PATH'
            EXPORTING
            CLIENT                           = SY-MANDT
              LOGICAL_PATH                     = p_dir
            OPERATING_SYSTEM                 = SY-OPSYS
            PARAMETER_1                      = ' '
            PARAMETER_2                      = ' '
            PARAMETER_3                      = ' '
            USE_BUFFER                       = ' '
              FILE_NAME                        = lv_file
            USE_PRESENTATION_SERVER          = ' '
            ELEMINATE_BLANKS                 = 'X'
           IMPORTING
             FILE_NAME_WITH_PATH              = v_fullpath
           EXCEPTIONS
             PATH_NOT_FOUND                   = 1
             MISSING_PARAMETER                = 2
             OPERATING_SYSTEM_NOT_FOUND       = 3
             FILE_SYSTEM_NOT_FOUND            = 4
             OTHERS                           = 5
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    endform.
    form upload_from_server.
    data: lv_msg type string,
          lw_data type ty_data.
    open dataset v_fullpath for input message lv_msg in text mode encoding default.
    if sy-subrc <> 0.
    message lv_msg type 'i'.
    stop.
    endif.
    do.
    read dataset v_fullpath into lw_data.
    if sy-subrc <> 0.
    write:/5 'Error in processign data set'.
    exit.
    endif.
    append lw_data to i_data.
    enddo.
    close dataset v_fullpath.
    if sy-subrc <> 0.
    write: /5 'Error closing dataset'.
    endif.
    endform.
    form split_data.
    data: lw_data type ty_data.
    data: lw_itab type stritab.
    data: begin of ty_itab,
          land1 type v_t604-land1,
          stawn type v_t604-stawn,
          bemeh type v_t604-bemeh,
          impma type v_t604-impma,
          minol type v_t604-minol,
          end of ty_itab.
    loop at i_data into lw_data.
    split lw_data at c_tab into
          ty_itab-land1
          ty_itab-stawn
          ty_itab-bemeh
          ty_itab-impma
          ty_itab-minol.
    lw_itab-land1 = ty_itab-land1.
    lw_itab-stawn = ty_itab-stawn.
    lw_itab-bemeh = ty_itab-bemeh.
    lw_itab-impma = ty_itab-impma.
    lw_itab-minol = ty_itab-minol.
    append lw_itab to gi_itab.
    endloop.
    endform.
    start-of-selection.
    loop at gi_itab into gw_itab.
    write: /5 'COUNTRY', 'IMPORT CODE', 'SUP UNIT', 'FIRST UOM', 'SECOND UOM',
           /5 gw_itab-land1, gw_itab-stawn,gw_itab-bemeh,gw_itab-impma,gw_itab-minol.
    endloop.
    end-of-selection.
    I hope problem must be in p_dir and p_file which are in bold.. Kindly help me out. Thanks in advance.

    see the following ex:
    *&      Form  SUB_GET_FILEPATH
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_GET_FILEPATH .
        GFILE = 'D:\SAP_INT\INBOUND\INBOX'.  "Path
    ENDFORM.                    " SUB_GET_FILEPATH
    *&      Form  SUB_GET_FILE
          text
    -->  p1        text
    <--  p2        text
    FORM SUB_GET_FILE .
      DATA: P_FDIR(200) TYPE C.
      DATA: IT_FILEDIR1 TYPE STANDARD TABLE OF TY_FILEDIR WITH HEADER LINE.
      P_FDIR = GFILE.
      CALL FUNCTION 'RZL_READ_DIR_LOCAL'
        EXPORTING
          NAME     = P_FDIR
        TABLES
          FILE_TBL = IT_FILEDIR.
      REFRESH : IT_FILEDIR1.
      LOOP AT IT_FILEDIR.
        IF IT_FILEDIR-NAME(4) = 'ZINC' OR IT_FILEDIR-NAME(4) = 'zinc'.
          MOVE IT_FILEDIR-NAME TO IT_FILEDIR1-NAME.
          APPEND IT_FILEDIR1.
        ENDIF.
      ENDLOOP.
      IF IT_FILEDIR1[] IS INITIAL.
        STOP.
      ENDIF.
      LOOP AT IT_FILEDIR1.
        REFRESH: I_TAB.
        CLEAR: I_TAB.
        NAME = IT_FILEDIR1-NAME.
        CONCATENATE: GFILE '\' NAME INTO G_FILE.
        OPEN DATASET G_FILE FOR INPUT IN TEXT MODE
                                         ENCODING DEFAULT
                                         IGNORING CONVERSION ERRORS.
        IF SY-SUBRC EQ 0.
          CONCATENATE 'FILENAME  : ' G_FILE INTO I_MSG1.
          APPEND I_MSG1.
          DO.
            READ DATASET G_FILE INTO RECORD.
            IF SY-SUBRC = 0.
              SPLIT RECORD AT ',' INTO I_TAB-BUKRS  I_TAB-EBELN
                  I_TAB-BLDAT  I_TAB-XBLNR I_TAB-LIFNR I_TAB-AMOUNT
                  I_TAB-CURR  I_TAB-BUSAREA
                  I_TAB-BKTXT I_TAB-DMBTR I_TAB-MENGE I_TAB-SRNO.
              MOVE-CORRESPONDING I_TAB TO I_TAB1.
            ELSE.
              EXIT.
            ENDIF.
            APPEND I_TAB1.
            CLEAR: I_TAB, I_TAB1.
          ENDDO.
        ENDIF.
        CLOSE DATASET G_FILE.

Maybe you are looking for

  • XML-XSLT problem. Please help

    I want to apply an XSLT to my XML to retrieve an element "firstName" My XSLT is as follows: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"/> <xsl:templa

  • IOException  :server returned http response code:505 for url url

    hi, my program creates IOException server returned http response code:505 for url <some url> I close the i/p stream.I dont know ,where is the problem.plz let me know.Thanks in advance. Here is the code: public class CallApplicationURL private static

  • Price determination 2 and S -- No material selected for CKMLCP

    Dear all, We have a case here that raw materials have price determination 2V, semi-finished and finished goods are 2S. The MM period is now 2011/07.  We tried to run CKMLCP for 2011/06 and system reponded "C+114 list contains no items". I have search

  • Average for each contragentid

    Hi all! This code works fine, it returns proper average value for contragentid = 1. So, correct result is LUAHPER = 14996837,94 But when I add values for contragentid = 2 (see commented strings), my statement returns incorrect result LUAHPER = 549780

  • Please help with simple Drag N Drop

    I'm desperate and need some help with this simple drag and drop. Here is the scenario-this animation is for a kindergarten course. I have 6 different colored teddy bears on the floor and the bears are to be placed on the middle shelf in the room, in