Directory upload is it possible in java?

Actually my client Requirement is Upload a directory with a Minimum of 1GB data using Jsps and Java in a Web Base Application. But I found most of the libraries in java supports file upload only
Can you please help me in this regard. Is there any libraries for Directory upload that to Minimum of 1GB. if any please give me details. and my final question is Does java supports directory upload ?

Many ways,
1. Take backup of the existing data in any UTF-8 locale.
2. Perform the Data import in any UTF-8 locale.
3. Verify the contents through the ldapsearch commands.
Same steps applies to any interfaces like, CLI or UI.
3. a Importing using Command line,
Before doing so you need to be sure that does file contains different locale data, i.e., NON_ASCII
The ldif file must be stored in UTF-8 encoding, and set your server locale to UTF-8 to run the below command.
$ dsconf import -h host1 -p 1389 /local/file/example/demo1.ldif \
ou=People,dc=example,dc=com3.b Using Directory Service Control Center Interface web based ui.
3.c Using ldapjdk API, using JNDI,JSP technologies, for more information see http://java.sun.com/products/jndi/tutorial/ldap/TOC.html
3.d Using Protocol based import
Hope it helps
-Shankar

Similar Messages

  • Is down casting possible in Java objects(reference variables)?

    I hope, Java up casting and down casting is possible in Java primitive variables like int float and so on.
    My doubt is,Does in object of Java(reference variables) support down casting?

    makpandian wrote:
    the ques i asked here is popped from my mind.We know that.
    But i did not get answer .Because you didn't do any research.
    Than s why i ask this here..That's the wrong approach. Do some research first. Use google, a textbook, a tutorial, the JLS, write some code, etc. etc.
    After spending time and effort doing that, if you still have questions, indicate clearly what you read and what part you didn't understand. The way you're doing it is NOT an effective way to learn, and it's a waste of everyone's time.

  • Is it possible in java to pass reference of object in Java?

    Hello,
    I'm relativily new to Java but I have "solid" knowledge in C+ and C# .NET+.
    Is it possible in java to pass reference of object in Java? I read some articles about weakreferences, softreferences, etc. but it seems that it's not what I'm looking for.
    Here is a little piece of code I wrote:
    package Software;
    import java.util.Random;
    * @author Rodrigue
    public class RandomText
        private Random rand = new Random();
        private Thread t;
        private String rText = "Rodrigue";
        public RandomText()
            t = new Thread()
                @Override
                public void run()
                    try
                        while(true)
                            UpdateText();
                            sleep(100);
                    catch(InterruptedException ex)
            t.start();
        private void UpdateText()
            int i = rand.nextInt();
            synchronized (rText)
                rText = String.valueOf(i);
        public String GetText()
            return rText;
    }It's just a class which start a thread. This class updates a text with a random integer 10 times per second.
    I would like to get a reference on the String rText (like in C++ ;) yes I know, I must think in Java :D). So, like that, I could get one time the reference, thanks to the GetText function, and update the text when my application will repaint. Otherwise, I always have to call the GetText method ... which is slow, no?
    Are objects passed by reference in java? Or, my string is duplicated each time?
    Thank you very much in advance!
    Rodrigue

    disturbedRod wrote:
    Ok, "Everything in Java is passed by value. Objects, however, are never passed at all.". Reference of object is passed by value too.
    But, how to solve my problem in Java_? I have an object which is continually modified in a thread. From an another side, this object is continually repainted in a form.I'm not sure I totally understand your problem. If you pass a reference to an object, then both the caller and the method point to the same object. Changing the internal state of the object (e.g. by calling a setter method) through one reference will be observed through both references, since they both point to the same object.
    No, calling a method is not particularly slow. Especially if it's just a simple getter method that returns the value of a member variable.
    If this is happening in a multithreaded context, you'll have to use proper synchronization to ensure that each thread sees the others' changes.

  • Is it possible in java 5 to generate a XML document from object?

    Hi all ,
    Is it possible in java 5 to generate a XML document from object?if yes, how do I implement this?
    ~Regards

    : /\ P:^P would look better. ;)
    0 0
      >
      U

  • Error :The function upload is not possible for this documentu2019

    Hi,
    The users are using Solution manager Help Desk system.
    When a specific user tries to create a message from the satellite system, and tries to upload a  document, he is unable to do so.
    He is getting an error message : 'The function <upload> is not possible for this documentu2019
    The message number is BCOS024.
    The user is unable to attach word, note pads, excel etc. any types of documents.
    He is able to type a description/ title etc and save the message. And the message is reflected in the Solution manager help desk system.
    He comes across that message only if he tries to upload an attachment.
    Please advice.
    Thanks in advance.

    Hi Kase,
    What version of SAPGUI you use?
    We had the same problem.
    This problem was solved once we upgraded SAPGUI to 710 Patch Level 11.
    Regards,
    Sanjai

  • Upload File in Web Dynpro Java CO and store it in the context

    Hi Guys!
    I have developed a web dynpro CO form, and I need to be able to upload a file in an action and then be able to download that file in further actions.. I have evaluated saving the file in the backend via RFC, in KM and also creating a CAF project.. but I think there must be a simpler way : saving it in the context of GP.
    Does someone knows if it is possible to do that?
    best regards,
    Marco.

    Hi Marco
    In webdynpro java, there are UI elements File Upload and File Download. You can use these UI's to upload and download attachments. From NetWeaver 7.0 onwards, you have IWDResource interface which can be used to upload attachments. But in GP if you want to pass attachment to another action you must use Binary as a data source. Bind the File upload UI element to Binary. In addition, you should define input and out parameters in getDescription method.
    Thanks
    Ghazanfar

  • Directory Upload instead of FileUpload

    Hi,
    I know there is a FileUpload UI element and this works fine.
    In the same way I want to be able to select a certain (local) directory. Is there a way to do this?
    Regards,
    Bert

    Security restrictions on the client side limit the amount of access to the filesystem.  Therefore in plain HTML you can't get a file listing for a directory, nor can you even upload more than one file at a time.
    With 7.01 we have AcfUpDownload.  It is a Java Applet that allows greater access to the file system.  While it can do multiple file uploads and downloads, it doesn't have any functionality to scan a directory and return a list of files.  Nor is there any file open/save dialog.  It was designed for DMS (Document Management System) Check-in and Check-out.  Primarily in 7.01 it can mostly be used for check-out and and check-in from the checked-out location. 
    In 7.02, we will enhance AcfUpDownload to include a file open/save dialog. Then the user could manually select all files in a directory and upload them.  However this function isn't available yet as 7.02 won't be available until next year.
    In the mean time, you might consider using Adobe Flex as a Flash Islands within your Web Dynpro ABAP application. I've got an eLearning on how to use Flash Islands as a multiple file uploader:
    https://wiki.sdn.sap.com/wiki/display/EmTech/IslandsWDA_MUploader

  • Manually upload .cap file on a java card

    Hi
    I wonder how to manually upload a .cap file on a java card. I do know that it must be an or more APDUs that contain the file and so on.
    What I wonder is how to convert a .cap file into a byte array (byte array that on-card installer can read and understand) without using JCOP or any other tools? Does (must) this array have a special format or something?
    I am interested in the process of taking a.cap file and convert it to byte array (nothing else).
    Thanks in advance!
    /Lyudmila

    The .cap file uploading mechanism depends if you have a java card or a GlobalPlatform card.Java Card cards are GlobalPlatform based.
    If you have a java card you can use the same mechanism that it is used with Cref (see Java Card Kit - Development Kit - Chapter 11): .cap file is divided in n apdus, one or more (if a component not fit in one apdu, for example method component) for component (first:Header.cap, second:directory.cap, third:import.cap, etc).
    If you use a GlobalPlatform card, the mechanism is more complex:
    first you have to create a session using a specific protocol (SCP01, SCP02, etc) through INITIALIZE UPDATE and EXTERNAL AUTHENTICATE commands, then an INSTALL FOR LOAD command and n LOAD commads as they are necessary.
    To use GlobalPlatform mechanism, see GlobalPlatform Specification 2.1.1.The JCRE spec does not define the applet loader and CREF has a basic version of an applet loader that is not GP compliant, but this is not the Java Card standard. To load onto any physical Java Card you will need to follow the GlobalPlatform specification.
    - Shane

  • Download A directory uploaded on a web server...

    We want to down load a directory which is uploaded on a web server... plz if any body can suggest how to do this thrtough servlets or any other method...

    Check out the java.util.zip.ZipOutputStream and java.util.zip.ZipEntry classes.
    Set the content type of your servlet response to "application/zip" and create the ZipOutputStream using the response output stream.
    Then you can create ZipEntries for each file and send them to the ZipOutputStream. Naming the zip entry with DIRECTORYNAME/FILENAME will create the appropriate directory structure.
    For each entry, position the new ZipEntry using the putNextEntry(ZipEntry) class of ZipOutputStream then use the write(byte[] b, int off, int len) method to write the file data. You can load the files into a series of byte arrays beforehand if you like.

  • Data Migration from 11i to R12 Global - Open POs,lines, receipts & on hand upload, Is it possible to do the onhand qty upload with over riding of all receipts which uploaded against Open PO lines?

    Hi Friends,
    We are in a phase of data migration from 11i to R12 
    I was discussed with client & they wants extraction of all open POs which was generated after 01 Jan 2014 to till date in 11i.
    Condition for open POs is PO qty-received qty=>0
    critical Example for open PO is :PO no: 10 has 4 lines, 3lines full qty has been received & for 1 line partial qty(say 50 out of 100) received.
    in this case he wants in R12 uploading as PO no:10 should entered as open PO with all 4lines & 3 lines complete receipt should be done, for 4th line partial qty i.e 50 should be received.
    the question is if we upload on hand qty first, then open POs & receipts, it will increase the onhand qty in new system(mismatch of on hand qty's 11i to R12) 
    Is it possible to do the onhand qty upload with over riding of all receipts which uploaded against Open PO lines.
    Or Please advice best solution.
    Thanks & Regards
    Giri

    adetoye50 wrote:
    Dear Contacts Journal Support Team,
    FYI, this is a user to user support forum.  You are NOT addressing Apple here.
    Honestly, I doubt anyone is really going to take the time to read the novel you have written.

  • 'A file or directory doesn't exist' error during java stack update

    Dear All,
    I've done a fresh installation of solution manger system on IBM iseries box (OS400 & DB2 combo).
    As part of post installation activity, I've updated the kernel patch, updated the ABAP stack to sp4, and am currently doing the java stack update.
    I'm struck with one error. The log file shows:
    Feb 23, 2012 7:54:35 PM  Error: /usr/sap/SLM/SYS/global/j2eeclient/META-INF/SAP_MANIFEST.MF (A file or directory in the path name does not exist.)
    Feb 23, 2012 7:54:35 PM  Error: Error deploying Fileset Complete to /usr/sap/SLM/SYS/global/j2eeclient
    Feb 23, 2012 7:54:35 PM  Info: ***** End of File-System Deployment com.sap.engine.client *****
    Feb 23, 2012 7:54:35 PM  Error: Aborted: development component 'com.sap.engine.client'/'sap.com'/'SAP AG'/'7.0209.20110628100654.0000'/'1', grouped by :
    Deployment was not successful
    I've checked the file system and found that the directory META-INF is not present in /../../global/j2eeclient
    Please suggest a solution.
    Thank You.
    regards,
    vin

    Hi,
    This is an easy solution:
    From the OS command line, do WRKLNK, go to /usr/sap/SLMS/global/j2eeclient,  at the top where it shows the directory, do a copy on this. Then at the command line type MD, do F4, paste the directory name in the first line, then after j2eeclient add /META-INF'
    IMportant*** Make sure the full directory name is in single quotes.*
    *On the next 2 lines change INDIR to RWX.  Then press enter and re-run your job.  If you have any problems let me know.

  • How to get  current working directory of the ftp server,in java application

    Hi All,
    I?m FTP?ing the file using java.net.url.
    Here is the snippet of the code:
    public void ftpFile()throws ChrsException
    try
    System.out.println("FTPing the file '"+localfile+"'");
    OutputStream os = openUploadStream(targetfile);
    FileInputStream is = new FileInputStream(localfile);
    byte[] buf = new byte[16384];
    int noOfBytesRead;
    while (true)
    //Read the data from the source File into buf
    noOfBytesRead = is.read(buf);
    if (noOfBytesRead <= 0)
    break;
    //Writes the data present in the buf to the target file
    os.write(buf, 0, noOfBytesRead);
    os.close();
    is.close();
    close();
    System.out.println ("The file '"+localfile+"' is Sucessfully FTP'd to '"+targetfile+"'");
    catch (MalformedURLException malExcp)
    System.out.println ("Invalid URL. Error in FTP'ing the file: \""+localfile+"\"");
    catch(IOException ioe)
    System.out.println ("Error in FTP'ing the file: \""+localfile+"\"");
    private OutputStream openUploadStream(String targetfile) throws MalformedURLException, IOException
    URL url = null;
    //Creates a URL object with FTP protocol
    if (user == null)
    url = new URL("ftp://" + host + "/" + targetfile + ";type=i");
    else
    url = new URL("ftp://" + user + ":" + password + "@" + host + "/" + targetfile + ";type=i");
    urlc = url.openConnection();
    //Get the OutputStream that writes to this connection.
    OutputStream os = urlc.getOutputStream();
    return os;
    Now I need to find what the current directory is when the user logs in with username and password on to the FTP server in java.
    Thanks in Advance.

    as soon as user logs in he is taken to the directory
    "ftproot/pub/abc".
    now If I execute pwd command , is hould be able to
    get to know tht user is under "ftproot/pub/abc"Three respected posters, well two plus me ;-), have just told you otherwise. The information about the current directory is (a) secure and (b) useless to the user, as he can't do anything with it. The user doesn't want to know that at all and you shouldn't try to tell him. And in any case FTP doesn't support it, again for security reasons, so you can't do it.
    Just accept it.

  • N:1 Mapping Possible using Java Mapping?

    All,
    Is it possible to do a N:1 mapping using Java Mapping?
    If yes , how?
    Reason for this question is that the execute() of the Java Mapping is going to take the source / request message as the InputStream . In the case of N:1 mapping , as we have multiple messages , how will they be send to the InputStream? Will both the messages be sent combined into the InputStream? Will the MESSAGES tag be embedded into the input stream?
    Regards,
    Bhavesh

    Hi @ll;
    i try the same.
    to conduct a java mapping with 2 input structures that fills one target structure.
    This mapping is part of a Integrationprocess.
    I tested the mapping at the Integration Repository (Interface mapping) with the structure given by henrique and it works fine without any error.
    At runtime this structure looks like this (different prefix)
    <?xml version="1.0" encoding="UTF-8"?>
    <sxi:Messages xmlns:sxi="http://sap.com/xi/XI/SplitAndMerge">
         <sxi:Message1>
              <YOURXML1>...</YOURXML1>
         </sxi:Message1>
         <sxi:Message2>
              <YOURXML2>...</YOURXML2>
         </sxi:Message2>
    </sxi:Messages>
    As I put it in the Integrationprocess unfortunately a strange error arises.
    The trace Workflow-Protocoll shows following error.
    <Trace level="2" type="T">Call method execute of the application Java mapping com.endress.infoserve.xi.mapping.MergeConfigStore_IdocOrder </Trace>
    <Trace level="2" type="T">Java mapping com/endress/infoserve/xi/mapping/MergeConfigStore_IdocOrder completed. (executeStep() of com.endress.infoserve.xi.mapping.MergeConfigStore_IdocOrder </Trace>
    <Trace level="1" type="T">Parsing error after multi mapping.Expected Message<i> instead of IDOC </Trace>
    I can't make head nor tail of it.
    what´s the mistake?
    can anybody please help me?
    Thanks in advance
    Kind regards

  • How to upload the file without using java components?

    Hello,
    I need to upload the file using JSP, but I don't want to use java componets(such as
    jspsmart).
    Who can tell me how to realize it? This issue is very important to me,
    thanks all in advance!

    make you're own servlet using the multipartrequest from o'reilly.
    easy and simple, no jspsmart, only 1 jar file and some descent programming.
    I use it like that...

  • Active Directory accountExpires and pwdLastSet  property using JAVA

    Hi all!
    I´m trying to transform the accountExpires and pwdLastSet property retrieved from Active Directory to a Date/Time object. The value returned is a weird long integer that can´t be converted. Does anyone know something about this?
    I´m using Java 2 SDK 1.4.2.
    I am trying to do the above for accountExpires and pwdLastSet attributes in AD
    Thanks

    DrClap wrote:
    First link returned for Google keywords "active directory date format":
    [http://support.microsoft.com/kb/555936]
    Why, of course, January 1, 1601...

Maybe you are looking for