How to add Ftp transfer to my app???

I need to upload htm files to my ftp server.
I'm new to java and I need to know if I need and API to add this capabilities to my app or if there is a class that can do this.
Do you know a link where I can get some ftp code samples?
Thank
Diego

J? napot, Laszlo.
I suspect the problems are much bigger than that.K?sz?n?m sz?pen, Ferenc -- the f is for Ferenc, isn't it? -- but just because we among the chosen who've done their dissertation on CLASSPATH doesn't mean we can't share out enlightenment.
Suggestions:
1. Download the right zip file: it's Commons Net, not Commons Upload.
2. Unzip it to find the file commons-net-1.1.0.jar.
3. There are many things you can do with this jar: put it on your CLASSPATH, refer to it using a command line argument etc... but perhaps the simplest way (assuming you're working on your own machine so there's no one to object to it): make it an extension: copy it into the appropriate jre/lib/ext directory . Where is this? It depends on your set up, but if you've installed the jdk, you should have a path like C:\j2sdk1.4.2etc...\jre\lib\ext and there's another copy of the jre in C:\Program Files\java\jre1.4.2etc...\lib\ext. You might as well copy the jar into both locations -- can't hurt.
4. Take a look at the docs you unzipped to find out the right inport statement and some sample code. For example, FTPClient's doc includes:
import org.apache.commons.net.ftp.*;
try {
      int reply;
      ftp.connect("ftp.foobar.com");
      System.out.println("Connected to " + server + ".");
      System.out.print(ftp.getReplyString());
      // After connection attempt, you should check the reply code to verify
      // success.
      reply = ftp.getReplyCode();
      if(!FTPReply.isPositiveCompletion(reply)) {
        ftp.disconnect();
        System.err.println("FTP server refused connection.");
        System.exit(1);
    } catch(IOException e) {
      if(ftp.isConnected()) {
        try {
          ftp.disconnect();
        } catch(IOException f) {
          // do nothing
      System.err.println("Could not connect to server.");
      e.printStackTrace();
      System.exit(1);
    }Viszontl�t�sra!

Similar Messages

  • Air iOS - How to add iPhone 6 icons to app.xml?

    I'm using Flash CS6 and Air 3.9 to publish an iOS app.
    How to add the icons for iPhone 6 and iPhone 6 Plus to the app.xml?
    I tried this but got an error:
    <icon>
    <!-- all other icon sizes -->
    <image120x120>AppIcons/app_120.png</image120x120>
    <image180x180>AppIcons/app_180.png</image180x180>
    </icon> 
    Any help appreciated.
    Thanks

    Hi,
    Thanks for reporting, but things are working fine at our end. Could you please tell us the error you are observing. Also i would recommend you to use latest SDK and Flash pro.
    Thanks,
    Jitender

  • How to add ftp capability to website

    I would like to add ftp capability to my website and need
    help getting started. I have turned on the ftp service at my host
    site but I don't know how to put the capability on the actual site.
    Is it a form or do I need a particular cgi script? I am looking for
    a direction more than instructions...point me right and I can
    figure it out. Thanks so much!
    Cathy

    > Is it just using an
    ftp://username:[email protected] in the address
    > bar?
    That's simple.
    > I'd really like them to go to a page that has a login
    and file browse
    > feature.
    That's more difficult - those are pages you'd have to create
    in DW.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "CathyInMichigan" <[email protected]> wrote
    in message
    news:gbuf6m$goh$[email protected]..
    > It's a very full-featured hosting company so I'm sure
    the scripts are
    > available. I just don't know what to ask for! I have set
    up the ftp
    > capability for the site, created folders for my users to
    upload to,
    > separate
    > from my site files, enabled anonymous ftp. I just don't
    know how to start
    > putting the upload facility on the site.
    >
    > Is it just using an
    ftp://username:[email protected] in the address
    > bar?
    > I'd really like them to go to a page that has a login
    and file browse
    > feature.
    > Is that too complicated?
    >

  • Noob ? How to add mx datagrid to mobile app

    Hi,
    I'm converting our first Desktop app to a mobile. I need to use a datgrid as it's basically is a look up table populated from a small SQLite database.
    I can not figure out how to get it to show up in the componants list.
    Using FB 4.6
    Can someone point me in the right direction?
    TIA
    Rich

    I tried <mx:DataGrid>
    Can I just replace the mx on for the spark one?
    What is the differances?
    Thanks for responding.
    Rich

  • How to add iPhone folios to iPad app in iTunes?

    My ipad app is in the itunes store.
    I have now built separate folios for the iphone 3/4 and iphone 5. The folio names are identical to the iPad app. I need to update the app to make these iphone folios available for download in iTunes app store. I have not "published" the iPhone folios in the DPS Folio Producer yet.
    Once I publish the iPhone folios in the Folio Producer, are they going to available in the App Store or do I also have to update/create a new multi-folio app with App Builder (selecting iPad and iPhone but using the same original app name/id) for them to be available to iPhone users?
    Not quite sure how this all works. I've read this:
    http://helpx.adobe.com/digital-publishing-suite/help/create-folio-renditions.html
    But still don't quite understand the iTunes part of it, and don't want to do this, wait a week for the app to be approved in iTunes, only to find out the iphone apps aren't there.
    Thanks!

    Did you set up the original app as both iPad and iPhone?
    If so you just need to publish your iphone folio's and they will appear in your app when viewed on an iPhone.
    If you didn't set it up as both in the first place, you will have to start again and do an Apple update
    Hope that helps a bit
    Alistair

  • How to add VIS Demo after installing APPS without it??

    Hi all,
    I have installed Oracle Applications wihout VIS Demo and now i want to add it. How can i do that?? Is there a script to do that?
    Tks,
    Paulo.

    Cannot be done. You must select the Vision install during the initial installation.
    Loading Vision DB on existing install
    Re: Loading Vision DB on existing install

  • How to add Headers/Images to flex app?

         Hi I have a flex application that I am currently trying to skin and wish to add a logo image into the application but the image doesnt show up when i load it

    hi,
    Just embed the logo its much easier, otherwise you need to have an event complete for the image to ensure its loaded before trying to display it.
    <mx:Image  source="@Embed(source='assets/mylogo.jpg')"/>
    David

  • How can I rapidly transfer files and apps from an old Macbook to a new Macbook?

    I purchased a new Macbook Pro to replace a 5 year old Macbook.  The 5 year old Macbook has Firewire 400, USB and Ethernet ports as well as WIFI and runs OSX 10.7.5.  The new Macbook Pro has USB 3, Thunderbolt, and HDMI ports as well as WIFI.  I started the  transfer  process with migration assistant using Ethernet cable from the older Macbook and WIFI on the new Macbook Pro.  I also connected a USB3 cable to the two computers for good measure, but migration-assistant only gave me the option of using Ethernet.  The 2 computers did sync and after 30 minutes the screen said it would take 30 hours plus, and after 3 hours it was up to 310 hours.  I am hoping that there is a simpler and faster way.  Thank you in advance for any assistance anyone can provide.

    You can get a thunderbolt to firewire adapter. You can then get a firewire 400 to 800 cable and put the old computer in target mode. Then you can follow these instructions.
    http://support.apple.com/kb/HT4889
    Choose migrate from other disk or volume.

  • How to add USB storage to Server.app

    I've recently moved to OSX for my development platform. I've installed the Server.app from the app store and need to start creating my development sites. The problem I'm having is that my 1TB USB 3.0 drive is not being seen by the Server.app's storage tab, thus not able to create website storage there. Can anybody please point me in the correct direction?!

    Hurray! We have success! So the answer is that only drives formatted in the MacOS Extended format work within the Server.app. Props to Mark23 for his indirectly direct answer to adding USB drives to OSX server!

  • How to add ADMOB advertisement into Android app using ADF Mobile

    hi,
    i need to integrate ADMOB advertisement into Android app.
    can i do that using Oracle ADF mobile?
    regards,
    ad

    Hi,
    I think, there is one example for ADF Mobile push notification with Google Cloud Messaging.
    http://deepakcs.blogspot.in/2013/06/adf-mobile-push-notifications-with.html
    Eba

  • Breakpoint 5.2 - how to add the Gyroscope in my App,

    My programm brakes if I start it and shows me the message below (with the " --> " and the green script)
    I don't know how to fix it.
    Can you halp me ?
    thank you
    ViewController8.m
    //  first try
    //  Created by Julian Fuchs on 22.02.14.
    //  Copyright (c) 2014 Julian Fuchs. All rights reserved.
    #import "ViewController8.h"
    @interface ViewController8 ()
    @end
    @implementation ViewController8
    @synthesize ball, delta;
    - (void)viewDidLoad
        UIAccelerometer *accel = [UIAccelerometer sharedAccelerometer];
        accel.delegate = self;
        accel.updateInterval = 1.0f / 60.0f;
        [super viewDidLoad];
    -(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
        NSLog(@"x : %g", acceleration.x);
        NSLog(@"x : %g", acceleration.y);
        NSLog(@"x : %g", acceleration.z);
        delta.y = acceleration.y * 10;
        delta.x = acceleration.x * 10;
        ball.center = CGPointMake(ball.center.x + delta.x, ball.center.y + delta.y);
    - (void)viewDidUnload
        [super viewDidUnload];
        [self setBall:nil];
    @end
    ViewController8.h
    //  first try
    //  Created by Julian Fuchs on 22.02.14.
    //  Copyright (c) 2014 Julian Fuchs. All rights reserved.
    #import <UIKit/UIKit.h>
    @interface ViewController8 : UIViewController <UIAccelerometerDelegate> {
        UIImageView *ball;
        CGPoint delta;
    @property (nonatomic, retain) IBOutlet UIImageView *ball;                   --> Thread1: breakpoint 5.2 Unknown class                                                                                  MainViewController in Interface Builder file.
    @property CGPoint delta;
    @end

    How do I use soundmixer to replace the sound from earphone to speakerphone
    Can you show me an example code on button?
    Thanks a lot!

  • How can I transfer a purchased app from my laptop to my Mac Pro?

    Okay, here's the problem: I always sync and backup my iPhone on my Mac Pro. However, I recently bought an app from iTunes on my laptop. Both my Mac Pro and my laptop are authorized for my account. However, when I plug my iPhone 4 into my laptop to add the app I purchased (in the usual way, by clicking on the App tab and dragging the newly purchased app into my iPhone home window), iTunes asks me if I really want to delete all of my other purchased apps (forty-something of them). Of course, I DON'T want to do that, but I can't figure out a way to transfer the purchased app from iTunes on my laptop to iTunes on my Mac Pro (where all my other apps live). I called Applecare, and they suggested that I copy all of the folders from my Mac Pro/Users/Me/Home/Library/iTunes/ folder to the matching folder on my laptop, which I did, but to no avail. Do I have to buy the app all over again (on my Mac Pro or directly on my iPhone)????
    It just occurred to me that I might be able to back up my iPhone on my laptop in addition to my Mac Pro, after which I might be able to add the recently purchased app without a problem. But if the answer is so simple, why didn't the applecare person suggest this? Has anyone else run into this conundrum?

    If you bought an app, if you try to buy it again it will just download the app again. You do not get double billed for the app. So you could down load the app again on your iphone or on your desktop. Alternatively you could use Home Sharing to sync purchased apps, movies, music between the computers. http://support.apple.com/kb/HT3819 explains how to enable/use home sharing.
    I hope that helps

  • How do I add image upload to web app edit template?

    How do I add image upload to web app edit template. When creating fields I am selecting image from the field type. But the only way to upload and image is when I create the web app item within the admin. The option to upload an image is not available when the user submit web form opens.
    Wont send any of these questions through this email anymore but really needed assistance.
    Thanks,
    Gordon

    On the Details tab of the Web App setup, under Web App Item Options; have you ticked "Allow File Upload" and specified a Default Upload Folder?

  • How do i transfer my ipad apps to my itunes?

    does anyone know how to transfer you ipad apps to your itunes?

    Hi Roxgr,
    You need to sync your iPad to your computer. Here's a link that will help:
    http://support.apple.com/kb/HT1296
    Cheers,
    GB

  • How do I transfer my iPad apps to my iTunes account on my computer?

    How do I transfer my iPad apps to my iTunes account on my computer?

    Connect the iPad to your computer and use the Transfer Purchases function in iTunes.
    (75313)

Maybe you are looking for

  • HT 1222 After Update App Problems ! Adobe Creative Cloud IllustratorCC

    hello everybody, so i'm runing mavericks 10.9.2 and today afternoon i saw an update on app store .. made it and after the safari update ... my app Adobe Illustrator CC doesnt works well ... it open but when i click open file or new file it crashes ..

  • 1 Movie file has video track for appletv & 1 for iphone

    Does anyone know how when you purchase a movie on itunes in HD, you get a beautiful HD movie to watch on your AppleTV that is a fairly large file, but when you choose to sync it to your iphone the movie file is MUCH smaller, made just for the iphone.

  • Can I use dates from dual to fetch all he rows between that dates?

    I am trying to get the records that have expirations in the month of May What is the correct syntax to use the dates from dual to get all the rows that fall between two dates. I am stuck with this query.. can any one look into it please.. insert into

  • Installation new BI Publisher 11g

    Hi I'm tyring to install Oracle Business Intelligence, v. 11.1.1.3.0. I created database, used RCU and provided all necessary data to instalator. On last step (12) where is big list of things to configure, almost everything is failing. Only few thing

  • Problem with spark:resize effect and constraint-layout

    Hi, maybe its just a missuderstanding, but how i an get this to work. Also move effects doesnt seem to work. Does somebody have a Link, where I can get deeeper in constraints and spark.effects? <?xml version="1.0" encoding="utf-8"?> <s:Application xm