Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2012-11-22T08:36:16Z by huub100759
huub100759
huub100759
48 Posts
ACCEPTED ANSWER

Pinned topic Save xls-files to network drive

‏2012-11-14T09:27:02Z |
Hi

i want to give users , of my RUI-application, the possibility to select (xls)-files from a drive (network and/or local) and save them to another network drive.
Im using RBD 8.0.1.3. and Tomcat 6.
what would be the best way to to that?

Thanks

Huub
Updated on 2012-11-22T08:36:16Z at 2012-11-22T08:36:16Z by huub100759
  • haroldBuchman
    haroldBuchman
    30 Posts
    ACCEPTED ANSWER

    Re: Save xls-files to network drive

    ‏2012-11-21T20:10:29Z  in response to huub100759
    Hello Huub.

    I don't know if this will help at all, but I've been working on uploading and moving image files within our EGL application.

    To move files within the application, I have invoked a system call from EGL using SysLib.callCmd()
    callCmd("mv " + tempPath + " " + fullPath);

    Note that both pathnames are full paths starting that the root of the server,
    and both paths need to be writeable by the EGL application.
    The only way I've found to actually verify the existence of a file is by using a Java external type:

    package externalTypes;
    // basic program
    //
    externalType myImageFile type JavaObject {javaName = "myImageFile", packageName = "myJava"}
    function check(fullFilePath String in) returns (Boolean);
    end

    package myJava;
    import java.io.*;

    public class myImageFile {

    public static boolean check(String fullFilePath) {
    File f = new File(fullFilePath);
    if(f.exists()){
    return(true);
    }else{
    return(false);
    }
    }
    }
    You mentioned writing to a network drive -
    I haven't done that, but my research indicates that Websphere has the notion of making external server directories and resources accessible to an application.
    Tomcat might allow something similar.
    If you want to upload a file here are two web pages that talk about using EGL JSF to do that.
    I've made the first one work.

    https://www-304.ibm.com/support/docview.wss?uid=swg21318912
    http://publib.boulder.ibm.com/infocenter/radhelp/v7r0m0/index.jsp?topic=/com.ibm.etools.jsf.doc/topics/tjsfaddfileup.html
    • huub100759
      huub100759
      48 Posts
      ACCEPTED ANSWER

      Re: Save xls-files to network drive

      ‏2012-11-22T08:36:16Z  in response to haroldBuchman
      HI Harold

      Thanks for you reaction!
      I used Aaron's :https://www-304.ibm.com/support/docview.wss?uid=swg21318912

      It works fine!

      Huub