Issues in Download File from Server to PC

Hi Experts,
i am havin requirement to download a File and show it to user in open/Sava dialog box.
i have tried both way to achieve this.
1)  cl_wd_runtime_services 2 File Download Elements
here is coding for cl_wd_runtime_services
  CONCATENATE 'C:\temp\'
                     stru_ctx_resume-cv_language
                     stru_ctx_resume-cv_type
                     stru_ctx_resume-oprn_role
                     lv_version
                      '.pdf' INTO lv_filename.
        lv_filetype = 'application/pdf'.
        lr_conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8' ).
Showing Downloaded File to new Window.
        cl_wd_runtime_services=>attach_file_to_response(
          i_filename  = lv_filename
          i_content   = lv_filecontent " Its file Byte Array
          i_mime_type = lv_filetype
          i_in_new_window = abap_false
          i_inplace       = abap_false ).
Problem Statement: Filedownload is working perfect, the only prolem is that IE give warning message before download, i want to get rid of this warning message so i opted for File Download UI Element.
2) File Dowload Element:
i have a file download element in a table collumn, this table is mapped to a node Called CTX_Resume, file download element's data property is mapped to attribute called file_content of type xSTring, this attribute is in node called data which is child node of CTX_Resume.(1:N, Lead Selection True, Singleton True)
so in summary
CTX_Resume(Node): Mapped to table
    File_DATA(Sub Node of CTX_Resume): It has Supply methodName: Sup_File_Data
          File_Content(Type Xstring) Mapped to Data property of Filedownload
Codding at Supply Method is
METHOD sup_file_data .
data declaration
  DATA:
    stru_file_data            TYPE wd_this->element_file_data,
    stru_resume           TYPE wd_this->element_ctx_resume,
        lv_filecontent TYPE zall_empprof_file_content,      "#EC NEEDED
        lv_error_text TYPE zall_empprof_error_text,         "#EC NEEDED
if wd_this->mv_first_time = abap_false.
  CALL METHOD parent_element->get_static_attributes
    IMPORTING
      static_attributes = stru_resume.
  if not stru_resume is INITIAL.
    MOVE stru_resume-cv_version TO lv_version.
  CALL METHOD wd_assist->download_cv
    EXPORTING
      im_doc_id       = stru_resume-doc_id
      im_doc_type     = 'pdf'
      im_doc_version  = stru_resume-cv_version
    IMPORTING
      ex_file_content = lv_filecontent " File Byte Array
      ex_error_text   = lv_error_text.
  IF lv_error_text IS INITIAL.
    move lv_filecontent to stru_file_data-file_content.
  ENDIF.
else.
  wd_this->mv_first_time = abap_false.
endif.
  node->bind_structure(
    new_item =  stru_file_data
    set_initial_elements = abap_true ).
ENDMETHOD.
Problem Statement: this works perfect only at first time as i cant controll the triggering of Supply method, to get rid of this i want whenever user clicks on File Download Link, it must trigger supply method.
My table doesnt have selections properites = none.
hope i have given sufficiant information about the problem,
please help me....
Regards
Manish.
Edited by: Manish Vijay on Jul 3, 2009 2:28 PM
Edited by: Manish Vijay on Jul 3, 2009 2:34 PM

It depends on your browser mime type setting.
If you donload a doc file for example and the client's browser is set as to open doc files automatically with word application you will not get the save file dialog box.
Its all dependent on the client machine setting and not on forms.

Similar Messages

  • Access/download file from server.

    have a problem. When I am trying to save/open a file from server(secure) which uses HTTPS, its displaying error message:
    Internet Explorer cannot download ...File_name.doc from Server_name.
    Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
    My code is below. Please help me out.
    Its working with my localhost(http) and with Firefix browser. Its something to do with http and IE 6.
    <java>
    if (!request.getScheme().equals("https"))
    response.setHeader("Pragma", "no-cache");
         String fileName=request.getParameter("instruction");
         //filename = filename.replaceAll( "\\W*", "" ) ;
         String DirName = request.getParameter("directory");
         String value = (DirName+"/"+fileName);
                   File f = new File (value);
                   response.setContentType("application/msword");
                   //set the header and also the Name by which user will be prompted to save
                   response.setHeader("Content-disposition", "attachment; filename=" + fileName);
                   InputStream in = new FileInputStream(f);
                   out.clearBuffer();          
                   int bit = 256;
                   int i = 0;
                   try {
                        while ((bit) >= 0) {
                             bit = in.read();
                             out.write(bit);
                   } catch (IOException ioe) {
                        ioe.printStackTrace(System.out);
                   out.flush();
                   out.close();
                   in.close();     
    </java>

    HI,
    To avoid redirection, Safari users are having good luck with Open DNS Free / Basic
    Carolyn

  • Downloading File from server

    I have written more or less same code like following
    to send file from server to browser in other web applications, where browser displays Save As dialog box
    to the user, but the same code doesn't work with portal.
    following code part of a page flow
    <pre>
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    protected Forward doUploadFile()
    HttpServletResponse res = this.getResponse();
    res.setContentType("application/x-download");
    String filename="C:\\somefile.pdf";
    File file = new File(filename);
    res.setContentLength((int)file.length());
    res.setHeader("Content-Disposition", "attachment;
    filename=" +filename);
    // Send the file.
    InputStream in=null;
    OutputStream out=null;
    try
    out = res.getOutputStream( );
    in = new BufferedInputStream(
    new FileInputStream(filename));
    byte[  ] buf = new byte[4 * 1024]; // 4K buffer
    int bytesRead;
    while ((bytesRead = in.read(buf)) != -1)
    out.write(buf, 0, bytesRead);
    finally
    if (in != null) in.close();
    if (out!= null) out.close();
    return new Forward("success");
    </pre>
    following is the JSP code to trigger the action of file
    download.
    <pre>
    <netui:form action="doUploadFile">
    <netui:button type="submit" value="Upload File" />
    </netui:form>
    </pre>
    Any clue ?

    Hi,
    Im having exactly the same problem. Did you find a way to do this.
    Thanks Chris

  • Code to download file from server

    Hi
    I need some code to download file from a server to a local machine.
    Can anybody help me, PLEASE
    Yohan Shikari

    If i try this :
    try
    //          path where the file is stord
    //          String idocPath = config.getServletContext().getInitParameter("idocPath");
              String idocPath = "C:/";
              String fileName = "http://194.98.51.253/utimaco.cer";
              String filePath = idocPath + "\\" + fileName;
              response.setContentType("APPLICATION/OCTET-STREAM");
              String disHeader = "Attachment;Filename=" + fileName ;
              response.setHeader("Content-Disposition", disHeader);
              File file = new File(filePath);
              FileInputStream fileInputStream = new FileInputStream(file);
              int i;
              while ((i=fileInputStream.read())!=-1)
              response.getOutputStream().write(i);
              response.getOutputStream().flush();
              response.getOutputStream().close();
              fileInputStream.close();
              }catch(Exception e)
              e.printStackTrace();
    I don't understand the "type variable" of response !!!
    Thomas

  • FTP error on downloading files from server

    I haven't changed my server settings in quite awhile, but
    some time ago, I started getting "FTP errors -- could not get file
    xxx.htm", and no further explanation.
    I am able to see all my files on the server, and am able to
    upload saved files to the server, as well as copy files from my
    local hard drive and upload them to the server. The only I can't do
    is get any files.
    I wrote to my ISP's tech support to check their logs, and all
    they saw was that all was well on their end. No permissions issues
    or errors reported in their logs.
    They asked if I had Passive mode checked -- I did. They
    suggested I disable my Firewall -- I don't have one. And that I try
    another FTP program. I tried FTP itself in Terminal, and my old
    version of GoLive 9. Both were able to get any file I requested,
    using the same connection settings and machine.
    So they're stumped.
    What am I doing wrong?

    Hi, Alan--
    My ISP checked their logs and found no permissions problems
    with any of the files I was attempting to download. I also checked
    the DW FTP log (Site-->Advanced-->FTP Log), and I am the only
    user who has any permissions on any file or directory, and I am
    logged in as my user.
    The log shows no attempt at a download being made at all, but
    only a LIST command:
    > CWD /usr/www/users/grndlvl/commerce/gl
    < 250 "/usr/www/users/grndlvl/commerce/gl" is new cwd.
    > PASV
    < 227 Entering Passive Mode (209,68,2,99,210,107)
    > TYPE A
    < 200 Type okay.
    > LIST
    < 150 Data connection accepted from 97.93.92.248:56921;
    transfer starting.
    < -rw-r--r-- 1 grndlvl users 74417 May 21 2008
    CSScriptLib.js
    < -rwxr-xr-x 1 grndlvl users 3242 May 21 2008 ccval.php
    < -rwxr-xr-x 1 grndlvl users 811 Jul 14 2008 error.php
    < -rw-r--r-- 1 grndlvl users 446 May 21 2008 font_set.css
    < -rwxr-xr-x 1 grndlvl users 2812 Jun 15 2008
    formContent.php
    < drwxr-xr-x 2 grndlvl users 2560 May 21 2008 images
    < drwxr-xr-x 2 grndlvl users 512 May 21 2008 includes
    < -rw-r--r-- 1 grndlvl users 24656 Mar 7 18:23
    index.shtml
    < -rw-r--r-- 1 grndlvl users 24685 May 25 2008
    indexf.shtml
    < -rwxr-xr-x 1 grndlvl users 8113 Mar 7 17:57 process.php
    < -rwxr-xr-x 1 grndlvl users 8109 Jun 13 2008
    processup.php
    < -rwxr-xr-x 1 grndlvl users 7976 May 22 2008
    processupf.php
    < -rwxr-xr-x 1 grndlvl users 5230 Mar 7 18:50 receipt.php
    < -rwxr-xr-x 1 grndlvl users 11904 Jun 28 2008
    receiptgl.php
    < drwxr-xr-x 2 grndlvl users 512 May 21 2008 ssi
    < -rwxr-xr-x 1 grndlvl users 368 May 21 2008 sysinfo.php
    < drwxr-xr-x 2 grndlvl users 512 May 21 2008 test
    < -rwxr-xr-x 1 grndlvl users 1557 May 21 2008 testcc.php
    < -rwxr-xr-x 1 grndlvl users 378 May 21 2008 transact.pl
    < 226 Listing completed.
    And here is the error log:
    Started: 3/8/09 4:09 AM
    /usr/home/grndlvl/public_html/commerce/gl/ccval.php - error
    occurred - An FTP error occurred - cannot get ccval.php.
    File activity incomplete. 1 file(s) or folder(s) were not
    completed.
    Files with errors: 1
    /usr/home/grndlvl/public_html/commerce/gl/ccval.php
    Finished: 3/8/09 4:09 AM
    This is happening for every file and every directory on my
    site.
    All My Best,
    Jeffrey

  • How to download file from server to client's local ??

    How to download a file from the server to the client's local machine in a particular folder without users intervention ie. 'Save As" prompt of the browser should be avoided and if the client clicks on "Download" button, the file should get automaticaly downloaded to say, "c:/reports/' on his/her local machine. This is for Java based web appliaction.

    http://jguru.com/faq/view.jsp?EID=10646

  • Issues loading .txt files from server...

    Hi.
    I have an issue with a script I created that loads text strings from a file on my server.
    The swf file loads a message from a .txt file, displays it in an animation when the animation finishes it loops back to the start and loads the next message and displays it in the animation.
    All works fine. However the script reads the text file from the server on every loop ( 3 seconds ) This will be hard on my server so... Is there a way to read the text file once only and then loop through the eight statements?
    Thanks. Z
    Actionscript 2. Flash CS3. Flash Player 10.
    quotes.txt - text file containing eight quotes
    quote_txt - Dynamic field within animation
    ranQuote = new LoadVars();
    ranQuote.onLoad = function(success) {
        if (success) {
            RanNum = RanNum+1;
            if (RanNum>=9) {
                RanNum = 1;
                ran = this["quote"+(RanNum)];
                quote_txt.text = ran;
            } else {
                ran = this["quote"+RanNum];
                quote_txt.text = ran;
        } else {
            quote_txt.text = "Display if can't load txt file";
    ranQuote.load("quotes.txt");

    Unless I'm missing something, each time you load the file you are loading the entire file.  So you should have all of what's in it stored.  Your load function appears to just be picking out one of them out randomly after they're all loaded.
    I assumed wrongly that this isn't all the code you have and other loading code is what you are trying to inhibit.
    What you probably want to do is take most of your onLoad code and place it into a function.  What you have that is pulling up the quotes should utilize that function.  You shouldn't be using that loading code each time some button or whatever loop cycles.

  • Download file from server to Mobile Device

    Hello everyone,
    I would like to know firstly if downloading a file from a server to the Mobile device is possible or not. Secondly, if it is then is there a working example (code) I can use.
    What I need is to simply download a text (.txt) file, nothing fancy :-)
    Thanks,
    TADA

    Hi,
    First of all your mobile device has to support JSR75 (PDA Optional Package for J2ME = File connection & PIM).
    Use following link to read a very useful article at SDN, about this API.
    http://developers.sun.com/techtopics/mobility/apis/ttips/fileconnection/
    There is also the sample code located, you are looking for.
    bye,
    Asghar

  • Air download files from server

    I have an Air app that should display a DataGrid with a list of files that can be downloaded from my web server. It works perfect as a Flex program. I get 2 errors that I list at the bottom. I have a downloadFile.as file in a com folder
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection; 
    import mx.rpc.events.ResultEvent; 
    import mx.controls.Alert; 
    import mx.events.ListEvent; 
    Bindable] public var directoryDS:ArrayCollection; 
    Bindable] public var serviceURL:String; 
    Bindable] public var fileIndex:Number;  
    public function initApp():void{
    serviceURL =
    "http://www.youngsmarket.com/directory.cfm"; //Set the URL to the httpservice
    directoryDS =
    new ArrayCollection([]); // This is where the results of the httpservice will end up.
    fileIndex = -1;
    directory_srv.send();
    // Taking the data returned from the httpservice and creating FileDownload objects to populate the directoryDS array collection.
    private function setDataSource(evtObj:Object):void
    var fileDL:DownloadFile; 
    var collection:ArrayCollection = evtObj.directory.file as ArrayCollection; // pass httpservice result into a local scope
    var i:int; 
    //loop over results and create a new DownloadFile object and add it to the directoryDS ArrayCollection
    for (i=0;i < collection.length; i++){
    fileDL =
    new DownloadFile();fileDL._file = collection.getItemAt(i).name;
    fileDL._url =
    "http://www.youngsmarket.com/myFiles/"; // Change this to match your Files directory path.
    fileDL._size = collection.getItemAt(i).size;
    directoryDS.addItem(fileDL);
    ]]>
    </mx:Script>
    <mx:HTTPService  id="directory_srv" url="{serviceURL}" result="setDataSource(event.result)"/>
    <mx:DataGrid  dataProvider="{directoryDS}" id="filesDG" doubleClickEnabled="true" itemDoubleClick="downloadFile()" change="setFileIndex(event.target.selectedIndex);"width="
    100%" height="100%" borderStyle="none" themeColor="#73B9B9">
     <mx:columns>
     <mx:DataGridColumn dataField="_file" headerText="File" minWidth="150" />
     <mx:DataGridColumn dataField="_size" headerText="Size" minWidth="100" />
     </mx:columns>
     </mx:DataGrid>
    Error on this line:   var fileDL:DownloadFile;
    the error is:   Type not found or is not compile time constant: DownloadFile
    the next error is this line:    fileDL = new DownloadFile();
    the error is:     call to a possibly undefined method DownloadFile

    hi,
    where is the import statement for the downloadfile class.....
    David.

  • Download file from server

    Hi All,
    I am creating & storing some PDF files in a folder in the server. I want to give a link in a JSP where the user can download the files fromt he server where it is stored. There are so many ways, please some one enlighten me on this; about which is the best way to do it.. the user should be able to see the dialogue box to save or print the document..
    Thanks a million in advance
    smallpost

    Hi All,
    I am creating & storing some PDF files in a folder
    in the server. I want to give a link in a JSP where
    the user can download the files fromt he server
    where it is stored. Just give the link.
    There are so many ways, please
    some one enlighten me on this; about which is the
    best way to do it.. Just give the link.
    the user should be able to see
    the dialogue box to save or print the document..Why a dialog? Those options (print and save) are available in the Acrobat Reader plug-in.

  • Download Files from Server to Client

    I have a flex application that sends data to a php page that
    then generates a pdf file and returns the name of that file to the
    application. All of that works fine. The problems start when I try
    to then download that file to the client.
    This is the Flex client code:
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.rpc.events.ResultEvent;
    [Bindable]
    private var pdfFiles:ArrayCollection;
    private function requestPDFHandler (event:ResultEvent):void
    if( event.result.Files == null ) { /* Table is empty */
    /*Do Nothing*/
    }else if( event.result.Files.File is ObjectProxy ) { /*
    Table has only one record */
    pdfFiles = new ArrayCollection( [event.result.Files.File] );
    }else { /* Table has many records */
    pdfFiles = event.result.Files.File as ArrayCollection;
    downloadPDF();
    private function getPDF():void {
    requestPDF.send();
    import flash.display.Sprite;
    import flash.events.*;
    import flash.net.FileReference;
    import flash.net.URLRequest;
    import flash.net.URLRequestMethod;
    private function downloadPDF():void {
    //trace (pdfFiles.list.getItemAt(0).FileName);
    var DOWNLOAD_URL:String = "
    http://" + dbLoc + "/PDF/tmp/" +
    pdfFiles.list.getItemAt(0).FileName;
    //trace(DOWNLOAD_URL);
    var fr:FileReference = new FileReference();
    var request:URLRequest = new URLRequest();
    request.url = DOWNLOAD_URL;
    //configureListeners(fr);
    fr.addEventListener(Event.CANCEL, cancelHandler);
    fr.download(request,"Product List.pdf");
    private function cancelHandler(event:Event):void {
    trace("cancelHandler: " + event);
    ]]>
    </mx:Script>
    <mx:HTTPService id="requestPDF" url="
    http://{dbLoc}/PDF/MakePDFDoc.php"
    method="POST" result="requestPDFHandler(event)">
    <mx:request xmlns="">
    <ProdGroupID>{cboProdGroup.selectedItem.ID}</ProdGroupID><CurrencyID>{cboCurrency.selecte dItem.ID}</CurrencyID>
    </mx:request>
    </mx:HTTPService>
    <mx:Button x="574" y="804" label="Save as PDF"
    width="144" height="34" fontFamily="Verdana" fontSize="12"
    cornerRadius="12" id="btnSavePDF" enabled="true"
    fillColors="[#33332d, #33332d]" fillAlphas="[1.0, 1.0]"
    color="#ffffff" textRollOverColor="#808080"
    textSelectedColor="#808080" borderColor="#000000"
    mouseUp="getPDF()"/>
    When the button is clicked it sends to the php page fine and
    recieves the name of the file. When it gets to
    "fr.download(request,"Product List.pdf");" in the downloadPDF
    function, the 'fr:FileReference' object gives me this error -
    "Error: Error #2037: Functions called in incorrect sequence, or
    earlier call was unsuccessful.". I don't understand what is causing
    the error. Any suggestions?

    Basically, you can try to:
    1. create a ServerSocket to listen to client request.
    2. once a request is received create a thread to handle that connection.
    3. find out what file does the client want.
    4. read the file into a byte array.
    5. flush the byte array back to the socket back to the client.
    6. once the client receive the content, start writing it to disk.
    You have to look into classes like ServerSocket, Socket, DataInputStream, DataOutputStream, FileInputStream, FileOutputStream, and etc.
    There are other ways to do it.
    Hope this helps.

  • Applet question, how to download resource files from server

    hi,
    i am new at applet world.
    i have an applet that reads some resource, data and configuration files. so i need to download these files from server to client. i did some resarch and could not find how to download files from server in an applet application.
    how can i do this task?
    thank you for your answers.

    You may want to distinguish between 'resources' and data/configuration files.
    'Resources' are non-class files that are part of your application, i.e without them the application would simply not work, just like class files.
    Those are typically images, sounds or resource bundles (GUI elements translated to different languages) that nobody except you, the developer, would touch (when releasing an upgrade or a patch).
    Those should just go into the applet jar or additional jars named in the applet tag.
    Data/configuration files, that may be changed by others than the developers, should be made available through HTTP, just like the applet jar itself. The applet will have (read) access to them using java.net.URLConnection.

  • Download file from AL11 into CSV to load MD into BPC

    Hi All
    I have an issue in downloading file from AL11 which is in the form of CSV.
    1) I have exported the masterdata for Costcenter using a Open hub.
    2) The file is residing at the app server AL11 in the form of CSV.
    3) I want to down load the file into CSV and upload that file into BPC NW for my costcenter diemension.
    When i am downloading the file from AL11 , the total records are merged into one row, i cannot download same as it is available in AL11.
    I have followed the HOW TO GUIED : HOW TO AUTOMATE MD LOADING IN BPC nw.
    I m unable to get the file properly on to my PC.
    could you please help me .
    AK

    You should open your file in AL11, then clicking 'List' then 'Save' you'll be able to download your file. There will be some header lines indeed.
    You'd better use an open hub with your local client as destination if you need the file.

  • Error occurred while downloading files from Administration Server...

    Hi guys,
    If i already have my application deployed and exploded in ../tmp/_WL_user , when I restart the managed server it will try to download again the files from the upload directory in the Administration Servers? (I'm using stage mode).
    Sometimes I got the following error:
    Caused By: java.io.IOException: [DeploymentService:290066]Error occurred while downloading files from Administration Server for deployment request "0". Underlying error is: "null"
    and I already have the war exploded in /tmp/_WL_user
    the staging mode is not only for the first deployment? when i don't have the war exploded in /tmp/_WL_user?
    I've some confusion related to the process or deployment/startup of the managed servers.
    Thanks

    Hi,
    when you get following error * DeploymentService:290066 * then that means
    A service on the machine is preventing the WebLogic Server remote instance from downloading the configuration file. This can be Hosts Intrusion Prevention (HIPS) agents or any other agent causing this issue.
    Disable the agent interfering with the download process to fix this issue.
    Regards,
    Kal

  • [HELP] Download file from FTP server

    hi,
    I want to write a java program that can download and upload files from ftp server. Currently I only manage to upload a file to ftp server but i cant download file from ftp server. Here is the source code that only allow user to upload file. Anyone can give me some guidelines so that my program can download and also upload file? thx.
    import java.io.*;
    import java.net.*;
    public class FTPUpload {
    private static final int CTRLPORT = 21;
    private static Socket ctrlSocket;
    private static PrintWriter ctrlOutput;
    private static BufferedReader ctrlInput;
    private static byte[] localHostAddress;
    public final static String DIR = "C:\\zip\\";
    public static void main(String[] args) {
    try {
    String host = "192.168.1.1";
    String loginName = "testuser";
    String password = "password";
    String dirName = "/home/testuser";
    String fileName = "hello.zip";
    ctrlSocket = new Socket(host, CTRLPORT);
    localHostAddress = ctrlSocket.getLocalAddress().getAddress();
    ctrlOutput = new PrintWriter(ctrlSocket.getOutputStream());
    ctrlInput = new BufferedReader(new InputStreamReader(ctrlSocket.getInputStream()));
    ctrlOutput.println("USER " + loginName);
    ctrlOutput.flush();
    ctrlOutput.println("PASS " + password);
    ctrlOutput.flush();
    ctrlOutput.println("CWD " + dirName);
    ctrlOutput.flush();
    ctrlOutput.println("TYPE I");
    ctrlOutput.flush();
    FileInputStream fis = new FileInputStream(DIR + fileName);
    Socket dataSocket = dataConnection("STOR " + fileName);
    OutputStream outstr = dataSocket.getOutputStream();
    int n;
    byte[] buff = new byte[1024];
    while ((n = fis.read(buff)) > 0) {
    outstr.write(buff,0,n);
    dataSocket.close();
    fis.close();
    ctrlOutput.close();
    ctrlInput.close();
    ctrlSocket.close();
    }catch (Exception e) {
    e.printStackTrace();
    private static Socket dataConnection(String ctrlcmd)
    throws IOException,UnknownHostException {
    String cmd = "PORT ";
    ServerSocket serverDataSocket = new ServerSocket(0,1);
    for (int i=0;i<4;i++) {
    cmd = cmd + (localHostAddress[i] & 0xff) + ",";
    cmd = cmd + (((serverDataSocket.getLocalPort())/256) & 0xff)
    + ","
    + (serverDataSocket.getLocalPort() & 0xff);
    ctrlOutput.println(cmd);
    ctrlOutput.flush();
    ctrlOutput.println(ctrlcmd);
    ctrlOutput.flush();
    Socket dataSocket = serverDataSocket.accept();
    serverDataSocket.close();
    return dataSocket;
    }

    Or just use a java.net.URL("ftp://...) ..., get its input stream, and away you go ...

Maybe you are looking for

  • My computer doesn't recognize my ipod nano 2nd gen

    My computer running Windows 7 doesn't recognize my ipod nano 2nd gen.  Also my ipod not seen in my itunes.  I did all the reset stuff and nothing works.  Do you think it is just shot???

  • Getting Time Out Dump while Executing Report

    Hello ABAP Experts, I am trying to execute a report, but while debugging I am getting time out dump on 2nd SELECT statement. SELECT vbeln           matnr           werks           lgort           volum           lgnum      FROM lips      INTO TABLE i

  • Reduce the number of response headers on getting image from storage

    Hello, I would like to know if it's possible to get an image from the storage without all the x-ms-* header, Etag and Content-MD5 I m trying to server images as fast as possible with less overhead possible and the blobs are unique and cannot change.

  • Track Table History

    Hi, I need to maintain history of TABLE_AA into TABLE_BB. Whenever a column is updated on TABLE_AA, the old record needs to be inserted into TABLE_BB (for history purpose). I am trying to achieve this using a trigger on the table AA but I am getting

  • How do I send many photographs on one email

    I would like to now if it is possible to send photographs via email on my iPad as well as lightening the size of the photos, much like one does on the windows system.