How to show real file name on file download box when the file is downloaded

Here is my procedure for downloading from Oracle database to the client, the file is stored in a Blob field, a DAD was defined with no errors, in fact the upload works with no errors. The files are in text format, the field MIME_TYPE has the value 'text/plain' and DAD_CHARSET is ascii.
PROCEDURE download(p_filename IN VARCHAR2) IS
BEGIN
wpg_docload.download_file(p_filename);
EXCEPTION
WHEN OTHERS THEN
htp.p(sqlerrm);
RETURN;
END;
All functions are runing well, in fact it downloads with no errors but the file name that is suggested is the name of the package where the procedure es saved.
How can the real file name be showed on here? it is the parameter p_filename
I am using IE 6.0 SP 2, Oracle 10g Enterprise Edition Release 10.1.
Thanks for help
Yuri Lopez

I forgot something, i am using Forms [32 bits] Versión 9.0.4.0.19 and using web.show_document with a call to the procedure in the DB

Similar Messages

  • Base64 to pdf. After conversion - how to show pdf file ?

    Hello all,
    I have to show and save a pdf file from internal table ion base64 format.
    I mean that I receive an internal table with data in base64 that represent a pdf file. I have
    to convert it into pdf file than show and save the file.
    I maked a conversion by:
      CALL METHOD utility->decode_base64
        EXPORTING
          encoded = encoded
        RECEIVING
          decoded = decoded.
    and, now my question is :
    What I have to do about the string decoded ? I have to append it somewhere ?
    and, how to create a pdf file from decoded string ?
    tks a lot.

    How to show PDF using SAPGui
    Please check my reply in the following thread

  • How to Show Clob File in Report 6I ?

    Hi i want to know how to show clob file in report 6i
    Regards
    Shahzaib ismail

    In this situation I do not use headers at all. Insted of that I use union in a query :
    select 'Firstname','Salary'
    from dual
    union all
    select firstname, to_char(salary)
    from employee;
    The first record will work as header
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Suneel Vishwakarma ([email protected]):
    Hello,
    I want to generate excel format of my report. I did it using Delimited option but it was not same as it appears in my browser if I choose html format.all the labels repeat with each instance of the row .
    Can you please give me the proper Solution.How should I proceed?
    Thanks & Regds.
    Suneel<HR></BLOCKQUOTE>
    null

  • No synch choice in safari. So how do I synch my bookmarks in safari to firefox when the synch icon firefox says you have to use does not exist in safari.

    no synch choice in safari. So how do I synch my bookmarks in safari to firefox when the synch icon firefox says you have to use does not exist in safari?
    I cannot set up synch with bookmarks in safari since there is no synch icon in preferences in safari.

    This is crazy. The directions on firefox keep telling you to go to links that do not exist to import bookmarks from safari.
    For example, it says;
    Firefox imports Safari settings automatically. Just go to File > Import... and select Safari. In the next window, check the boxes of what you want to import. For example, your Safari Bookmarks will appear in Firefox's Bookmarks menu as "From Safari." Whatever other bookmarks you had on your Safari Bookmarks Bar will automatically appear on your Firefox Bookmarks Bar, too.
    BUT THERE IS NO IMPORT LINK UNDER FILES ON FIREFOX!
    Then I tried to add a device. I got the code but the continue link was not on ever. I tried it over and over and it does not work.
    WHO MAKES THIS SYSTEM??? How can something that should be so simple be so impossible, and why does Firefox direct you to links that do not exist or, if they exist, do not work!
    Thanks,
    Mike Ruggeri

  • How to disply the input text box when the data in the table is empty

    Hi,
    I m using JDeveloper 11g 5.1.1.1 : How to display the Input text box when the data in the table is empty or by using the dual table.
    Since there is no record in the table, screen is displying only the lable. not displying the Input text box.? Any property is there to enable?.
    One more case i tried by using dual (eg Select '0' as name from dual) created one view object and dragged in the JSF screen as input combo box with list of values.
    In this case also it is not displaying the combo box.Just displaying the Lable name and 0 only.
    Regards
    Bijesh K

    Hi,
    I didn,t get you.Could you please explain. I am not choosing the ADF table. Selecting and dragging ADF form only.
    Regards
    Bijesh K

  • I have updated to the latest version of iTunes (11.2.2.3). However, when I connect my iPod it shows in My Computer and iTunes opens automatically when the iPod is connected but the device doesn't show in iTunes.  Any ideas?

    I have updated to the latest version of iTunes (11.2.2.3). However, when I connect my iPod it shows in My Computer and iTunes opens automatically when the iPod is connected but the device doesn't show in iTunes.  Any ideas?  I am on Windows 8.1 and my iPod is a Classic

    Hi murr18140,
    Welcome to the Support Communities!  The article below will help you troubleshoot the issue you are having with your iPod classic not being recognized in iTunes for Windows:
    iPod: Appears in Windows but not in iTunes
    http://support.apple.com/kb/TS1363?viewlocale=en_US
    I hope this information helps ....
    - Judy

  • How do i get an itunes library from a phone when the computer has crashed and it needs to go on a new computer

    How do i get an itunes library from a phone when the computer has crashed and it needs to go on a new computer

    1) ensure iTunes is authorized for your iTunes store account(s)
    2) connect your device and right-click or control-click it in the iTunes Source list, then choose transfer purchases from the shortcut menu that appears.
    3) sync the device
    iTunes will wipe the iPhone but, since you transferred your purchases in the previous step, your content will be in your library and you can re-populate the iPhone with it.
    above works for purchases from the iTunes store. for everything else, check out this post by Zevoneer.

  • HT1766 how to transfer photos from my ipad to my laptop when the ipad is disabled

    how to transfer photos from my ipad to my laptop when the ipad is disabled

    If you have photo stream on, you can stream from icloud (only photos from Camera Roll) otherwise no.

  • How can flex tell if  it's a mouseup event when the user releases the mouse button outside the flex application?

    how can flex tell if it's a mouseup event when the user
    releases the mouse button outside the flex application? Say for
    instance mousedown was done within a 500x500 embedded flex app but
    mouseup is outside or relased on the HTML background. One more
    thing, when we have something draggable, Flex doesn't execute the
    stopDrag() when the user releases the mouse button outside the
    embedded swf or fles app. Pls. help me with this. Thanks!

    I don't think the flex app can tell what happens outside the
    app. But it can detect when it leaves the app, so I have found the
    following line works fine inside initApp():
    this.stage.addEventListener(Event.MOUSE_LEAVE, yourFunction);
    and you have to:
    import flash.display.Stage;
    Doug

  • How to change a prospect status to customer in BP,when the prospect turns out to be a potential customer?Please help me with the details.

    How to change a prospect status to customer in BP,when the prospect turns out to be a potential customer?Please help me with the details.
    Moderation: Kindly search before you post

    Dear Ramesh,
    Using Account life cycle we can record the different stages of a BP.
    But at any point of time we can hold one Stage at Business partner.and once we change status Prospect ro Customer. We can't able to see Prospect Status in that BP.
    Ex -
    Stage A- Potentail
    Stage B- Prospect
    Stage C- Customer
    with the help of UI configuration we can define.
    Need your comment,
    Thx
    Karthik

  • Import window shows video thumbnails - How to show just file names ?

    iMovie 10
    OSX 10.10 Yosemite
    Importing video from external USB HD, the import window shows thumbnails, how to configure it to show just file names ?

    This seems to have a lot of info.
    http://homepage.mac.com/thgewecke/mlingos9.html
    I got the same question marks when I used a translator on the net to make a file called hello world.txt and hello world.rtf.
    doug-penningtons-Computer:~/Desktop dougpennington$ ls
    Dictionary.app russian.txt ???????????? ??????.txt
    Yahoo Search.app ???????????? ??????.rtf
    Dictionary
    russian.txt
    Yahoo Search
    привет мир
    привет мир.txt

  • How to show FTP Files in JTable, i gave codeeeee

    hi to all,
    plz any one can help me to show FTP Files in JTable, my FTP code is below,where i can upload and download files, i can list the files in JText Area , i want to show files in JTable, plz any on can post some code which can slove my problem
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class CFtp
       static final boolean debug = false;
       public static final int FTP_PORT = 21;
       static int FTP_UNKNOWN = -1;
       static int FTP_SUCCESS = 1;
       static int FTP_TRY_AGAIN = 2;
       static int FTP_ERROR = 3;
       static int FTP_NOCONNECTION = 100;
       static int FTP_BADUSER = 101;
       static int FTP_BADPASS = 102;
       public static int FILE_GET = 1;
       public static int FILE_PUT = 2;
       /** socket for data transfer */
       private Socket      dataSocket            = null;
       private boolean     replyPending       = false;
       private boolean     binaryMode            = false;
       private boolean     passiveMode            = false;
         private boolean     m_bGettingFile     = false;
       /** user name for login */
       String  user = null;
       /** password for login */
       String  password = null;
       /** last command issued */
       public String  command;
       /** The last reply code from the ftp daemon. */
       int lastReplyCode;
       /** Welcome message from the server, if any. */
       public  String       welcomeMsg;
       /** Array of strings (usually 1 entry) for the last reply
           from the server. */
       protected   Vector    serverResponse = new Vector(1);
       /** Socket for communicating with server. */
       protected Socket    serverSocket = null;
       /** Stream for printing to the server. */
       public PrintWriter  serverOutput;
       /** Buffered stream for reading replies from server. */
       public InputStream  serverInput;
       /* String to hold the file we are up/downloading */
       protected String strFileNameAndPath;
       protected String m_strSource;
       protected String m_strDestination;
       public void setFilename( String strFile )  {
            strFileNameAndPath = strFile;
       String getFileName()  {
            return strFileNameAndPath;
       public void setSourceFile(String strSourceFile)  {
          m_strSource = strSourceFile;
       public void setDestinationFile(String strDestinationFile)   {
          m_strDestination = strDestinationFile;
       public String getSourceFile()  {
          return m_strSource;
       public String getDestinationFile()  {
          return m_strDestination;
       void getCurrentDirectory()  {
         // return CSystem.getCurrentDir();
       /** Return server connection status */
       public boolean serverIsOpen()  {
          return serverSocket != null;
          /**Set Passive mode Trasfers*/
         public void setPassive(boolean mode)  {
            passiveMode = mode;
       public int readServerResponse() throws IOException  {
          StringBuffer    replyBuf = new StringBuffer(32);
          int             c;
          int             continuingCode = -1;
          int             code = -1;
          String          response;
          try  {
                while (true)  {
                   while ((c = serverInput.read()) != -1)  {
                                if (c == '\r')  {
                                       if ((c = serverInput.read()) != '\n')  {
                                            replyBuf.append('\r');
                                  replyBuf.append((char)c);
                                  if (c == '\n')
                                       break;
                             response = replyBuf.toString();
                             replyBuf.setLength(0);
                   try  {
                      code = Integer.parseInt(response.substring(0, 3));
                         catch (NumberFormatException e)  {
                    code = -1;
                         catch (StringIndexOutOfBoundsException e)  {
                      /* this line doesn't contain a response code, so
                      we just completely ignore it */
                      continue;
                   serverResponse.addElement(response);
                   if (continuingCode != -1)  {
                      /* we've seen a XXX- sequence */
                      if (code != continuingCode || (response.length() >= 4 && response.charAt(3) == '-'))  {
                         continue;
                              else  {
                         /* seen the end of code sequence */
                         continuingCode = -1;
                         break;
                         else if (response.length() >= 4 && response.charAt(3) == '-')  {
                      continuingCode = code;
                      continue;
                         else  {
                      break;
             catch(Exception e)  {
                  e.printStackTrace();
              if (debug)  {
              //     CSystem.PrintDebugMessage("readServerResponse done");
          return lastReplyCode = code;
       /** Sends command <i>cmd</i> to the server. */
       public void sendServer(String cmd)  {
          if (debug)  {
              //       CSystem.PrintDebugMessage("sendServer start");
          serverOutput.println(cmd);
          if (debug)  {
           //  CSystem.PrintDebugMessage("sendServer done");
       /** Returns all server response strings. */
       public String getResponseString()  {
          String s = new String();
          for(int i = 0;i < serverResponse.size();i++)  {
             s+=serverResponse.elementAt(i);
          serverResponse = new Vector(1);
          return s;
       public String getResponseStringNoReset()  {
          String s = new String();
          for(int i = 0;i < serverResponse.size();i++)  {
             s+=serverResponse.elementAt(i);
          return s;
       * issue the QUIT command to the FTP server and close the connection.
       public void closeServer() throws IOException  {
          if (serverIsOpen())  {
             issueCommand("QUIT");
                   if (! serverIsOpen())  {
                      return;
             serverSocket.close();
             serverSocket = null;
             serverInput = null;
             serverOutput = null;
       protected int issueCommand(String cmd) throws IOException  {
          command = cmd;
          int reply;
          if (debug)  {
           //  CSystem.PrintDebugMessage(cmd);
          if (replyPending)  {
             if (debug)  {
                   //     CSystem.PrintDebugMessage("replyPending");
             if (readReply() == FTP_ERROR)  {
                System.out.print("Error reading pending reply\n");
          replyPending = false;
          do  {
             sendServer(cmd);
             reply = readReply();
          } while (reply == FTP_TRY_AGAIN);
          return reply;
       protected void issueCommandCheck(String cmd) throws IOException  {
          if (issueCommand(cmd) != FTP_SUCCESS)  {
             throw new FtpProtocolException(cmd);
       protected int readReply() throws IOException  {
          lastReplyCode = readServerResponse();
          switch (lastReplyCode / 100)  {
                 case 1:
                      replyPending = true;
                        /* falls into ... */
                 case 2://This case is for future purposes. If not properly used, it might cause an infinite loop.
                   //Don't add any code here , unless you know what you are doing.
                 case 3:
                      return FTP_SUCCESS;
             case 5:
                      if (lastReplyCode == 530)  {
                             if (user == null)  {
                                  throw new FtpLoginException("Not logged in");
                           return FTP_ERROR;
                        if (lastReplyCode == 550)  {
                             if (!command.startsWith("PASS"))  {
                                  throw new FileNotFoundException(command);
                   else  {
                                  throw new FtpLoginException("Error: Wrong Password!");
             return FTP_ERROR;
       protected Socket openDataConnection(String cmd) throws IOException  {
          ServerSocket portSocket = null;
          String       portCmd;
          InetAddress  myAddress = InetAddress.getLocalHost();
          byte         addr[] = myAddress.getAddress();
          int          shift;
          String       ipaddress;
          int          port = 0;
          IOException  e;
              if (this.passiveMode)  {
         //          CSystem.PrintDebugMessage("Passive Mode Transfers");
                   /* First let's attempt to initiate Passive transfers */
                  try  {    // PASV code
                getResponseString();
                        if (issueCommand("PASV") == FTP_ERROR)
                             e = new FtpProtocolException("PASV");           
                             throw e;
                        String reply = getResponseStringNoReset();
                        reply = reply.substring(reply.indexOf("(")+1,reply.indexOf(")"));
                        StringTokenizer st = new StringTokenizer(reply, ",");
                        String[] nums = new String[6];
                        int i = 0;
                   while(st.hasMoreElements())
                        try
                             nums[i] = st.nextToken();
                             i++;
                        catch(Exception a)
                             a.printStackTrace();
                   ipaddress = nums[0]+"."+nums[1]+"."+nums[2]+"."+nums[3];
                   try
                        int firstbits = Integer.parseInt(nums[4]) << 8;
                        int lastbits = Integer.parseInt(nums[5]);
                        port = firstbits + lastbits;
                   catch(Exception b)
                        b.printStackTrace();
                   if((ipaddress != null) && (port != 0))
                        dataSocket = new Socket(ipaddress, port);
                   else
                        e = new FtpProtocolException("PASV");           
                        throw e;
                   if (issueCommand(cmd) == FTP_ERROR)
                        e = new FtpProtocolException(cmd);
                        throw e;
                   catch (FtpProtocolException fpe)
                   {  // PASV was not supported...resort to PORT
                        portCmd = "PORT ";
                        /* append host addr */
                        for (int i = 0; i < addr.length; i++)
                             portCmd = portCmd + (addr[i] & 0xFF) + ",";
                   /* append port number */
                   portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
                        + (portSocket.getLocalPort() & 0xff);
                 if (issueCommand(portCmd) == FTP_ERROR) {
                     e = new FtpProtocolException("PORT");
                     portSocket.close();
                     throw e;
                   if (issueCommand(cmd) == FTP_ERROR) {
                        e = new FtpProtocolException(cmd);
                        portSocket.close();
                        throw e;
                   dataSocket = portSocket.accept();      
                   portSocket.close();
              }//end if passive
              else 
                   {  //do a port transfer
                   //     CSystem.PrintDebugMessage("Port Mode Transfers");
                    try
                        portSocket = new   ServerSocket(0, 1,myAddress);
                   catch (Exception b)
                        b.printStackTrace();
              portCmd = "PORT ";
              /* append host addr */
              for (int i = 0; i < addr.length; i++) {
                portCmd = portCmd + (addr[i] & 0xFF) + ",";
              /* append port number */
              portCmd = portCmd + ((portSocket.getLocalPort() >>> 8) & 0xff) + ","
                    + (portSocket.getLocalPort() & 0xff);
              if (issueCommand(portCmd) == FTP_ERROR) {
                e = new FtpProtocolException("PORT");           
                portSocket.close();
                throw e;
              if (issueCommand(cmd) == FTP_ERROR) {
                e = new FtpProtocolException(cmd);
                portSocket.close();
                throw e;
              dataSocket = portSocket.accept();      
              portSocket.close();
            }//end of port transfer
            return dataSocket;     // return the dataSocket
        /** open a FTP connection to host <i>host</i>. */
        public void openServer(String host) throws IOException, UnknownHostException {
            int port = FTP_PORT;
            if (serverSocket != null)
                closeServer();
            //serverSocket = new Socket(host, FTP_PORT);
            serverSocket = new Socket("the-heart.com", FTP_PORT);
            serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),true);
            serverInput = new BufferedInputStream(serverSocket.getInputStream());
        /** open a FTP connection to host <i>host</i> on port <i>port</i>. */
        public void openServer(String host, int port) throws IOException, UnknownHostException {
            if (serverSocket != null)
                closeServer();
            serverSocket = new Socket(host, port);
            //serverSocket.setSoLinger(true,30000);
            serverOutput = new PrintWriter(new BufferedOutputStream(serverSocket.getOutputStream()),
                                           true);
            serverInput = new BufferedInputStream(serverSocket.getInputStream());
            System.out.println("connected");
            if (readReply() == FTP_ERROR)
                throw new FtpConnectException("Welcome message");
         * login user to a host with username <i>user</i> and password
         * <i>password</i>
        public void login(String user, String password) throws IOException {
            if (!serverIsOpen())
                throw new FtpLoginException("Error: not connected to host.\n");
           this.user = user;
            this.password = password;
            System.out.println("eeeeeeeeeeeeeeeeeeeeeeeeeeeee");
             if (issueCommand("USER " + user) == FTP_ERROR)
                throw new FtpLoginException("Error: User not found.\n");
            if (password != null && issueCommand("PASS " + password) == FTP_ERROR)
                throw new FtpLoginException("Error: Wrong Password.\n");
         * login user to a host with username <i>user</i> and no password
         * such as HP server which uses the form "<username>/<password>,user.<group>
        public void login(String user) throws IOException
            if (!serverIsOpen())
                throw new FtpLoginException("not connected to host");
            this.user = user;
            if (issueCommand("USER " + user) == FTP_ERROR)
                throw new FtpLoginException("Error: Invalid Username.\n");                
        /** GET a file from the FTP server in Ascii mode*/
        public BufferedReader getAscii(String filename) throws IOException
            m_bGettingFile = true;
            Socket  s = null;
            try  {
              s = openDataConnection("RETR " + filename);
                catch (FileNotFoundException fileException)  {
               throw new FileNotFoundException();
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** GET a file from the FTP server in Binary mode*/
        public BufferedInputStream getBinary(String filename) throws IOException
            m_bGettingFile = true;
            Socket  s = null;
            try  {
              s = openDataConnection("RETR " + filename);
              catch (FileNotFoundException fileException)  {
               throw new FileNotFoundException();
            return new BufferedInputStream(s.getInputStream());
        /** PUT a file to the FTP server in Ascii mode*/
       public BufferedWriter putAscii(String filename) throws IOException
           m_bGettingFile = false;
           Socket s = openDataConnection("STOR " + filename);
           return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
        /** PUT a file to the FTP server in Binary mode*/
       public BufferedOutputStream putBinary(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("STOR " + filename);
            return new BufferedOutputStream(s.getOutputStream());
        /** APPEND (with create) to a file to the FTP server in Ascii mode*/
       public BufferedWriter appendAscii(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("APPE " + filename);
            return new BufferedWriter(new OutputStreamWriter(s.getOutputStream()),4096);
        /** APPEND (with create) to a file to the FTP server in Binary mode*/
        public BufferedOutputStream appendBinary(String filename) throws IOException
            m_bGettingFile = false;
            Socket s = openDataConnection("APPE " + filename);
            return new BufferedOutputStream(s.getOutputStream());
       /** NLIST files on a remote FTP server */
        public BufferedReader nlist() throws IOException
            Socket s = openDataConnection("NLST");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** LIST files on a remote FTP server */
        public BufferedReader list() throws IOException
            Socket s = openDataConnection("LIST");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        public BufferedReader ls() throws IOException
            Socket s = openDataConnection("LS");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        public BufferedReader dir() throws IOException
            Socket s = openDataConnection("DIR");
            return new BufferedReader( new InputStreamReader(s.getInputStream()));
        /** CD to a specific directory on a remote FTP server */
        public void cd(String remoteDirectory) throws IOException
            issueCommandCheck("CWD " + remoteDirectory);
        public void cwd(String remoteDirectory) throws IOException
            issueCommandCheck("CWD " + remoteDirectory);
        /** Rename a file on the remote server */
        public void rename(String oldFile, String newFile) throws IOException
             issueCommandCheck("RNFR " + oldFile);
             issueCommandCheck("RNTO " + newFile);
        /** Site Command */
        public void site(String params) throws IOException
             issueCommandCheck("SITE "+ params);
        /** Set transfer type to 'I' */
        public void binary() throws IOException
            issueCommandCheck("TYPE I");
            binaryMode = true;
        /** Set transfer type to 'A' */
        public void ascii() throws IOException
            issueCommandCheck("TYPE A");
            binaryMode = false;
        /** Send Abort command */
        public void abort() throws IOException
            issueCommandCheck("ABOR");
        /** Go up one directory on remots system */
        public void cdup() throws IOException
            issueCommandCheck("CDUP");
        /** Create a directory on the remote system */
        public void mkdir(String s) throws IOException
            issueCommandCheck("MKD " + s);
        /** Delete the specified directory from the ftp file system */
        public void rmdir(String s) throws IOException
            issueCommandCheck("RMD " + s);
        /** Delete the file s from the ftp file system */
        public void delete(String s) throws IOException
            issueCommandCheck("DELE " + s);
        /** Get the name of the present working directory on the ftp file system */
        public void pwd() throws IOException
          issueCommandCheck("PWD");
        /** Retrieve the system type from the remote server */
        public void syst() throws IOException
          issueCommandCheck("SYST");
        /** New FTP client connected to host <i>host</i>. */
       public CFtp(String host) throws IOException
          openServer(host, FTP_PORT);
        /** New FTP client connected to host <i>host</i>, port <i>port</i>. */
       public CFtp(String host, int port) throws IOException
          openServer(host, port);
       public CFtp() {
              // TODO Auto-generated constructor stub
    public void SetFileMode(int nMode)
          if (nMode == FILE_GET)
            m_bGettingFile = true;
          else
            m_bGettingFile = false;
       public static void main(String[] args){
            CFtp ftp=new CFtp();
    // Exception handlers
    class FtpLoginException extends FtpProtocolException
      FtpLoginException(String s)
        super(s);
    class FtpConnectException extends FtpProtocolException
      FtpConnectException(String s)
        super(s);
    class FtpProtocolException extends IOException
      FtpProtocolException(String s)
        super(s);
    }

    It's jakarta :)
    The jakarta class:
    /* <!-- in case someone opens this in a browser... --> <pre> */
    import org.apache.commons.net.ftp.*;
    import java.util.Vector;
    import java.io.*;
    import java.net.UnknownHostException;
    /** This is a simple wrapper around the Jakarta Commons FTP
      * library. I really just added a few convenience methods to the
      * class to suit my needs and make my code easier to read.
      * <p>
      * If you want more information on the Jakarta Commons libraries
      * (there is a LOT more you can do than what you see here), go to:
      *          http://jakarta.apache.org/commons
      * <p>
      * This Java class requires both the Jakarta Commons Net library
      * and the Jakarta ORO library (available at http://jakarta.apache.org/oro ).
      * Make sure you have both of the jar files in your path to compile.
      * Both are free to use, and both are covered under the Apache license
      * that you can read on the apache.org website. If you plan to use these
      * libraries in your applications, please refer to the Apache license first.
      * While the libraries are free, you should double-check to make sure you
      * don't violate the license by using or distributing it (especially if you use it
      * in a commercial application).
      * <p>
      * Program version 1.0. Author Julian Robichaux, http://www.nsftools.com
      * @author Julian Robichaux ( http://www.nsftools.com )
      * @version 1.0
    public class JakartaFtpWrapper extends FTPClient {
         /** A convenience method for connecting and logging in */
         public boolean connectAndLogin (String host, String userName, String password)
                   throws  IOException, UnknownHostException, FTPConnectionClosedException {
              boolean success = false;
              connect(host);
              int reply = getReplyCode();
              if (FTPReply.isPositiveCompletion(reply))
                   success = login(userName, password);
              if (!success)
                   disconnect();
              return success;
         /** Turn passive transfer mode on or off. If Passive mode is active, a
           * PASV command to be issued and interpreted before data transfers;
           * otherwise, a PORT command will be used for data transfers. If you're
           * unsure which one to use, you probably want Passive mode to be on. */
         public void setPassiveMode(boolean setPassive) {
              if (setPassive)
                   enterLocalPassiveMode();
              else
                   enterLocalActiveMode();
         /** Use ASCII mode for file transfers */
         public boolean ascii () throws IOException {
              return setFileType(FTP.ASCII_FILE_TYPE);
         /** Use Binary mode for file transfers */
         public boolean binary () throws IOException {
              return setFileType(FTP.BINARY_FILE_TYPE);
         /** Download a file from the server, and save it to the specified local file */
         public boolean downloadFile (String serverFile, String localFile)
                   throws IOException, FTPConnectionClosedException {
              FileOutputStream out = new FileOutputStream(localFile);
              boolean result = retrieveFile(serverFile, out);
              out.close();
              return result;
         /** Upload a file to the server */
         public boolean uploadFile (String localFile, String serverFile)
                   throws IOException, FTPConnectionClosedException {
              FileInputStream in = new FileInputStream(localFile);
              boolean result = storeFile(serverFile, in);
              in.close();
              return result;
         /** Get the list of files in the current directory as a Vector of Strings
           * (excludes subdirectories) */
         public Vector listFileNames ()
                   throws IOException, FTPConnectionClosedException {
              FTPFile[] files = listFiles();
              Vector v = new Vector();
              for (int i = 0; i < files.length; i++) {
                   if (!files.isDirectory())
                        v.addElement(files[i].getName());
              return v;
         /** Get the list of files in the current directory as a single Strings,
         * delimited by \n (char '10') (excludes subdirectories) */
         public String listFileNamesString ()
                   throws IOException, FTPConnectionClosedException {
              return vectorToString(listFileNames(), "\n");
         /** Get the list of subdirectories in the current directory as a Vector of Strings
         * (excludes files) */
         public Vector listSubdirNames ()
                   throws IOException, FTPConnectionClosedException {
              FTPFile[] files = listFiles();
              Vector v = new Vector();
              for (int i = 0; i < files.length; i++) {
                   if (files[i].isDirectory())
                        v.addElement(files[i].getName());
              return v;
         /** Get the list of subdirectories in the current directory as a single Strings,
         * delimited by \n (char '10') (excludes files) */
         public String listSubdirNamesString ()
                   throws IOException, FTPConnectionClosedException {
              return vectorToString(listSubdirNames(), "\n");
         /** Convert a Vector to a delimited String */
         private String vectorToString (Vector v, String delim) {
              StringBuffer sb = new StringBuffer();
              String s = "";
              for (int i = 0; i < v.size(); i++) {
                   sb.append(s).append((String)v.elementAt(i));
                   s = delim;
              return sb.toString();
    and then there is the jar file:
    http://jakarta.apache.org/site/downloads/
    so for the wrapper.listfiles() you have to declare the wrapper as JakartaFtpWrapper.

  • Bridge CC: how to show hidden files?

    My search returned hidden files.
    Could you please show me how to reveal hidden files.
    View | Show Hidden files IS checked.
    Thanks.

    Open the Script Editor or AppleScript Editor in one of the subfolders of Applications and run the following:
    tell application "Finder" to quit
    if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is "1" then
    do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
    else
    do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
    end if
    delay 2
    tell application "Finder" to run
    If you change your mind later, run the script again.
    (65149)

  • How to show argument variable names to webservice client

    Hi java expert(S)!
    This is sri, i am creating a webservice using sun java studio enterprise 8.1 IDE, my problem is consumer(from .net) say ,parameter names are not clear or visible. say, for example, my webservice method look like
    public java.lang.String login(final String clientid, final String password) throws java.rmi.RemoteException {...}
    to me but for webservice client String login(String_1, String_2). so how to show argument variables to client
    webservice client needs to know argument names for proper usage.
    Any body knows how to do this, Any help will be appreciated!!!!!
    Thanks & Regards,
    SRI.

    hI
    i have posted my wsdl below
    If you go through , you can find that in order to call a method , we have to supply string or int arguments but those names are not shown
    for example to call login , you need to supply 2 string arguments but how do you know first one is username and second one is for password.
    it shows simply string_1 and string_2 as arguments, instead if it shows login(String username,String password) for caller(webservice client), it will be easy to handle you know.
    How to do this????
    <definitions name="mysws" targetNamespace="urn:mysws/wsdl">
    &#8722;
         <types>
    &#8722;
         <schema targetNamespace="urn:mysws/types">
    &#8722;
         <complexType name="getData">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    <element name="int_3" type="int"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getDataResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getMoreRows">
    &#8722;
         <sequence>
    <element name="int_1" type="int"/>
    <element name="int_2" type="int"/>
    <element name="int_3" type="int"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="getMoreRowsResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="insertData">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="insertDataResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="login">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    <element name="String_3" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="loginResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="logout">
    &#8722;
         <sequence>
    <element name="String_1" type="string" nillable="true"/>
    <element name="String_2" type="string" nillable="true"/>
    </sequence>
    </complexType>
    &#8722;
         <complexType name="logoutResponse">
    &#8722;
         <sequence>
    <element name="result" type="string" nillable="true"/>
    </sequence>
    </complexType>
    <element name="getData" type="tns:getData"/>
    <element name="getDataResponse" type="tns:getDataResponse"/>
    <element name="getMoreRows" type="tns:getMoreRows"/>
    <element name="getMoreRowsResponse" type="tns:getMoreRowsResponse"/>
    <element name="insertData" type="tns:insertData"/>
    <element name="insertDataResponse" type="tns:insertDataResponse"/>
    <element name="login" type="tns:login"/>
    <element name="loginResponse" type="tns:loginResponse"/>
    <element name="logout" type="tns:logout"/>
    <element name="logoutResponse" type="tns:logoutResponse"/>
    </schema>
    </types>
    &#8722;
         <message name="myswsSEI_getData">
    <part name="parameters" element="ns2:getData"/>
    </message>
    &#8722;
         <message name="myswsSEI_getDataResponse">
    <part name="result" element="ns2:getDataResponse"/>
    </message>
    &#8722;
         <message name="myswsSEI_getMoreRows">
    <part name="parameters" element="ns2:getMoreRows"/>
    </message>
    &#8722;
         <message name="myswsSEI_getMoreRowsResponse">
    <part name="result" element="ns2:getMoreRowsResponse"/>
    </message>
    Regards,
    Sri

  • Two alias in Mail: how to show different "from" names?

    I've been reading various threads about aliases in mail, but none have exactly described my situation. What I want to be able to do is set up aliases in my one account and have the mail shown as "from" a different name depending on which alias I've used.
    Here's my current set-up:
    Account Type: POP
    Description: POP account
    Email address: [email protected], [email protected]
    Full Name: myname & mywifesname
    Incoming mail server: pop.domain.com
    username: xxxxx
    password: xxxxx
    outgoing mail server: smtp.domain.com
    So, we can each send email "from" our own email address, but they're all marked as from "myname & mywifes name". How do I change it so if I select "[email protected]" the mail is shown as simply from "myname" and vice versa.
    I understand from reading other threads that the one thing I can't do is set up a separate account for each, as they will both have the same incoming server and username. (Which was exactly what I could do back in the dark ages of Outlook Express.)

    Unless you really just absolutely want to have your sent emails say they're from "Trevor C" or from "Trevor C's Spouse", you could just delete the full name entry from that account in Mail's Preferences (i.e., set full name field to null), and then any sent messages' "from" address will simply appear as being from [email protected] or from [email protected], depending on which "account" (alias) you selected in the "Account" pull-down menu. This would be, I think, the easiest patch for you to implement.
    People who get email from me get mail from "[email protected]" and not from "J.V." Personally, I hate the full name crap and wish there were a way to display the "from" field in my inbound message viewer pane in email address format, rather than full name format. But that's just me.
    (if you find that this solves your problem, or is actually helpful towards arriving at a solution to your problem, please consider clicking on either the "helpful" or "solved" buttons in the header of my post)

Maybe you are looking for

  • Downloading DNG converter and it's not working

    I've downloaded, reinstalled, and tried several different versions of DNG converter to download my 2nd shooters Nikon D7100 RAW .NEF files, but it's not finding any images once I have it installed. I've downloaded version 7.4 for Windows, which conta

  • Condition Types- LSMW

    Hi All , I am uploading the Condition types , Transaction Code VK11 , Can I use the std " Batch Program RV14BTCI". In which I am not able to map the sales Organisation , distribution channel and division.etc. Please guide me how to use this Std progr

  • I believe I opened a link to a phishing email.

    I believe I opened a link to a phishing email. After opening, it took me to some bogus webpage and I quickly closed out of it and deleted the email. I didn't enter any information onto the webpage. Am I in any danger of identity theft? If so, what sh

  • XI and LDAP

    Hello experts, how can I establish a connection between XI and Novell eDirectory or Microsoft Active Directory via LDAP? Best regards David

  • Deactivating after a failed installation

    Installation of Adobe Premiere Elements 10 failed for some reason.  I can't resume installation without uninstalling the program.  When uninstalling I'm prompted to deactivate the serial number first, but I don't know how.  I can't do it from within