Can you submit an ftp statement from servlet

Hi,
I need to submit an ftp upload. Can I do this somehow inside a servlet. I want to copy a file from an ftp://... to my server. Not sure if this is possible.
Thanks in advance.

THanks I have done it! If anyone would like to know, here is the sniplet.
private String FTPTest(){
try{
//Get the movie in binary format
URL url = new URL("ftp://username:[email protected]/file/" + FileName);
URLConnection connection = url.openConnection();
InputStream stream = connection.getInputStream();
BufferedInputStream in = new BufferedInputStream(stream);
FileOutputStream file = new FileOutputStream("/uploadedMovie.asf);
BufferedOutputStream out = new BufferedOutputStream(file);
//Download the movie
int i;
while ((i = in.read()) != -1) {
out.write(i);
//Flush buffers
out.flush();
//Catch errors
}catch(Exception e){
return "";
}

Similar Messages

  • How can I display the HTML page from servlet which is called by an applet

    How can I display the HTML page from servlet which is called by an
    applet using the doPost method. If I print the response i can able to see the html document. How I can display it in the browser.
    I am calling my struts action class from the applet. I want to show the response in the same browser.
    Code samples will be appreciated.

    hi
    I got one way for this .
    call a javascript in showDocument() to submit the form

  • Can you print password protected pdfs from an ipad?

    can you print password protected pdfs from an ipad?

    This may help, but I do note that the printer you state is NOT on the airprint list. You may need to go to the app store and see if Canon has an app that will facilitate printing on a non AirPrint device.
    http://support.apple.com/kb/HT4356

  • HT3702 How can you remove a credit card from your account?

    How can you remove a credit card from itunes account?

    See if this support document answers your question. Why can’t I select None when I edit my Apple ID payment information? - Apple Support

  • Is there a way to view earlier messages in a thread without going through each day? Also, can you make a photo album from the same text thread without going back to the beginning?

    Is there a way to view earlier messages in a thread without going through each day? Also, can you make a photo album from the same text thread without going back to the beginning?

    Turn Settings > General > Accessibility > Zoom to ON.

  • HT1364 can you move an itunes library from pc to mac?

    Hi everyone,
    The days of my laptop are nearing the end and I'm strongly leaning towards purchasing a macbook. Can you transfer your media library from pc to mac?
    Can you export a copy your library onto an external drive as I don't know how much longer this laptop will last?
    Thanks for the help

    Sorry, I obviously wasn't clear. If you replicate the library from Computer 1 to Computer 2 by copying it, then all will be well. I routinely sync my iPhone and iPad both at home and at work using a single library that I migrate between the two locations via an external drive which is kept up do date using SyncToy.
    Backup the iPod touch on Computer 1.
    Copy the entire iTunes folder from Computer 1 to Computer 2, replacing any existing iTunes folder on Computer 2.
    Check that content is accessible in the migrated library. (Won't be a problem for a standard iTunes library where all the content is inside the iTunes Media folder which in turn is inside your iTunes folder).
    Connect iPod touch to Computer 2.
    Sync.
    In the unlikely event that something goes wrong (it won't) then you can connect the device back to Computer 1 to restore it.
    Note device backups are not stored within the iTunes library and stay on the machine on which they were created. It is theorectically possible to migrate them but there isn't really any point. Once you have synced the iPod with the copy of the library on Computer 2 then Computer 2 will make its own backup of the device.
    tt2

  • Can you get your money back from itunes

    Can you get your money back from itunes

    if you purchase a itunes gift card you will not be able get your money back. unless if it has never been used, such as enetering the bar code then you can probably take it in to the original store where you bought it from with the receipt. 

  • How can you pull in pdf's from iBooks and bring them into the Box app?

    How can you pull in pdf's from iBooks and bring them into the Box app?

    That sounds great, but I'm lost.
    I followed these steps:
    1) Open your PDF (in Adobe Acrobat Pro)
    2) Chose print
    The print/printer options pop-up will show.
    3) In the printer section, do not use your normal printer, a printer named Adobe PDF should be an option. Chose it.
    4) Under the "Page handling" section, change the Page Scaling drop-down menu to "Multiple pages per sheet".
    It works fine, but it looses all of the font information and the search no longer works. How can you do it and save the font info, so the search tool continues to operate.
    Am I missing anything?

  • Can you make an animated gif from edge animate?

    Can you make an animated gif from edge animate?

    not natively. edge exports html and javascript files, not video files, or frames.
    however, you could use a third-party program that has a video screenshot function and make one that way.

  • Can you please record a video from a web cam with inital setting

    Can you please record a video from a web cam that has the
    following specs
    fps: 20
    bitrate: 1000
    Size: 500*400
    can we configure that in code or is it a webcam specs?

    QuickTime Player Pro can't record the screen.
    QuickTime X can record the screen (but only all of it and not just a window). It's a part of Snow Leopard.

  • Can you transfer hd video directly from an ipod and then EDIT that video in imovie? I will be on the road and wont have a mac, just an ipad 2 and ipod touch. I want to shoot video on the touch and edit it on the ipad. Thanks!

    Can you transfer hd video directly from an ipod touch to the ipad 2 and then EDIT that video in imovie? I will be on the road and wont have a mac, just an ipad 2 and ipod touch. I want to shoot video on the touch and edit it on the ipad. Thanks!

    Thanks Tgara.
    Its funny. So far the responses have been 50/50 on this question. I even asked two seperate Apple Store employees here in NYC, and got two different answers! One said yes, the other no.
    Argh!
    I know from watching the keynote speech about icloud and iOS 5 that you will be able to cut the cord between the pc and ios devices like the ipad. No more need to sync them via a cord. So will that mean i would then be able to load video directly to the ipad via tha cam kit connector from my ipod? Also i wonder if/when Apple will allow HD video from on Apple devices like a canon dslr to be able to transfer to the ipad via the cam kit connector AND be able to EDIT that footage in imovie for the ipad. Speaking of imovie for the ipad...i hope it gets an update soon as well.
    Anyway....with the macbook airs getting updated next week with thunderbolt and new sandy bridge chips....i may just get one of them instead of the ipad 2 for editing video on the road. Still...i prefer surfing the web experience on the ipad. Grrrrrrr. **** youuuuuuu Apple!!! Lol

  • Can you create a .ics file from entries in a PDF?

    Hi,
    I'm wondering if anyone can help me: Can you create a .ics file from entries in PDF?
    Example:
    I'm wanting people to be able to choose a number of dates for some events within a PDF, then click a button that will then create a (or number of) .ics files so they can add those dates to the calendar of their choice. Is this possible?
    Thanks

    Using the solution supplied by Leonia, and cited by Keith, you can do the same thing (flopping the Curve profiles) in LightRoom. So, it makes sense. Though I didn't know know it worked for Color Negatives.
    A friend of mine with a Nikon Coolscan is going to scan nearly 150 B&W rolls of 35mm negatives for me, and I want to import them all into Aperture, naming and keywording as I go. The objective is, of course, to have the convenience of a diigtal library. But also to have some made into large prints for framing.

  • Can you upgrade to acrobat 11 from cs3

    I have acrobat 9 pro from CS 3.  I bought the upgrade to Acrobat 11.  When I put in the serial number from CS 3 Design Premium it does not work.  Can you upgrade to Acrobat 11 from cs3, and if not can you "return" the upgrade you bought?

    Hi,
    No, its not a valid path to upgrade from CS3 to Acrobat 11. You need to contact Adobe Chat Support to return the Acrobat 11 you bought.
    Contact Customer Care
    Regards,
    Anoop

  • Can you stitch digital TIFFs taken from all sides of the object into a 3D image in CS-6

    Can you stitch digital TIFFs taken from all sides of the object into a 3d image in CS-6

    It depends on the object. The mesh must have surfaces (texture names) for each side of that object. Then an image can be applied to each side.
    Photoshop currently lacks a way to select a side and give it a name.
    You may want to try a program like blender to assign surfaces to a mesh. It is a very robust and daunting program, but its free and if you have the time maybe worth your while to learn it.

  • Can you intercept an Oracle error from a "Process Row" process?

    Hi,
    Can you intercept an Oracle error from a "Process Row" process?
    Example:
    I have been just creating a validation process to check if I'm about to insert a duplicate record so I can give the user a "User friendly" error message.
    It would be awesome if in the error message you can select "PL/SQL function returning result" and have it pass it to the Notification area..
    I doubt there is a way but I thought I would ask..

    >
    I think everyone is waiting for a better exception-handling, but even 4.0 won't bring any improvements in this area.This is kind of what bugged me about 4.0. I feel that they put more effort into making it cool and flashy and ignored some pretty basic core issues like error handling. I mean sure the new jquery powered application builder is nice, but your users never see that - they do however see you not being able to hook into the error handling. There are several issues that have lingered for years that keep getting passed over for other things - i mean the Forms conversion release was such a waste in my opinion. They could have used that release to fix some bugs.
    Of course thats my 2 cents.

Maybe you are looking for

  • ITunes library xml from windows to mac using external drive.

    Hi there! I'm a newbie on mac computers.. I've recently purchase a macbook pro retina. So, I used to use iTunes in windows XP. My old computer crashed and I can't re-open it and save files... Now, the only file I have from my windows library is an "l

  • How to go for multiple business group

    Dear All. This is a very common and perhaps very old question now. But I just want to check what is the common process to go through to achieve multiple business groups. We are in oracle 12.1.XX and have single business group but now looking to imple

  • SAP Netweaver/General settings/Set Countries/Set Country-Specific Checks

    Hi All, following the customizing navigation: SAP Netweaver/General settings/Set Countries/Set Country-Specific Checks By the flag "Other data", I can activate the check of tax numbers. So, SAP gives me an error message if a tax number filled in mast

  • Run-time error "CALL_FUNCTION_NOT_FOUND" occurred

    Hi everyone: I am proving an interface from a ficticious R/3 system to XI, but there is a problem when connecting with XI. The outbound channel(sender to XI) is not created in the directory because of from a R/3 service you dont need to create one. I

  • Which version of Websphere Application Server for BOE XI 3.1 SP3?

    Hi, We are planning to migrate from BOE XI R2 to BOE XI 3.1 SP3 and we have to decide which application server would be the best choice. In a document "SAP BusinessObjects Enterprise XI 3.1 SP3 for Windows u2013 Supported Platforms" WebSphere Applica