How to get the target file name from an URL?

Hi there,
I am trying to download data from an URL and save the content in a file that have the same name as the file on the server. In some way, what I want to do is pretty similar to what you can do when you do a right click on a link in Internet Explorer (or any other web browser) and choose "save target as".
If the URL is a direct link to the file (for example: http://java.sun.com/images/e8_java_logo_red.jpg ), I do not have any problem:
URL url = new URL("http://java.sun.com/images/e8_java_logo_red.jpg");
System.out.println("Opening connection to " + url + "...");
// Copy resource to local file                   
InputStream is = url.openStream();
FileOutputStream fos=null;
String fileName = null;
StringTokenizer st=new StringTokenizer(url.getFile(), "/");
while (st.hasMoreTokens())
                fileName=st.nextToken();
System.out.println("The file name will be: " + fileName);
File localFile= new File(System.getProperty("user.dir"), fileName);
fos = new FileOutputStream(localFile);
try {
    byte[] buf = new byte[1024];
    int i = 0;
    while ((i = is.read(buf)) != -1) {
        fos.write(buf, 0, i);
} catch (Throwable e) {
    e.printStackTrace();
} finally {
    if (is != null)
        is.close();
    if (fos != null)
        fos.close();
}Everything is fine, the file name I get is "e8_java_logo_red.jpg", which is what I expect to get.
However, if the URL is an indirect link to the file (for example: http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719 , which link to a file named JavaSetup6u18-rv.exe ), the similar code return AutoDL?BundleId=37719 as file name, when I would like to have JavaSetup6u18-rv.exe .
URL url = new URL("http://javadl.sun.com/webapps/download/AutoDL?BundleId=37719");
System.out.println("Opening connection to " + url + "...");
// Copy resource to local file                   
InputStream is = url.openStream();
FileOutputStream fos=null;
String fileName = null;
StringTokenizer st=new StringTokenizer(url.getFile(), "/");
while (st.hasMoreTokens())
                fileName=st.nextToken();
System.out.println("The file name will be: " + fileName);
File localFile= new File(System.getProperty("user.dir"), fileName);
fos = new FileOutputStream(localFile);
try {
    byte[] buf = new byte[1024];
    int i = 0;
    while ((i = is.read(buf)) != -1) {
        fos.write(buf, 0, i);
} catch (Throwable e) {
    e.printStackTrace();
} finally {
    if (is != null)
        is.close();
    if (fos != null)
        fos.close();
}Do you know how I can do that.
Thanks for your help
// JB
Edited by: jb-from-sydney on Feb 9, 2010 10:37 PM

Thanks for your answer.
By following your idea, I found out that one of the header ( content-disposition ) can contain the name to be used if the file is downloaded. Here is the full code that allow you to download locally a file on the Internet:
      * Download locally a file from a given URL.
      * @param url - the url.
      * @param destinationFolder - The destination folder.
      * @return the file
      * @throws IOException Signals that an I/O exception has occurred.
     public static final File downloadFile(URL url, File destinationFolder) throws IOException {
          URLConnection urlC = url.openConnection();
          InputStream is = urlC.getInputStream();
          FileOutputStream fos = null;
          String fileName = getFileName(urlC);
          destinationFolder.mkdirs();
          File localFile = new File(destinationFolder, fileName);
          fos = new FileOutputStream(localFile);
          try {
               byte[] buf = new byte[1024];
               int i = 0;
               while ((i = is.read(buf)) != -1) {
                    fos.write(buf, 0, i);
          } finally {
               if (is != null)
                    is.close();
               if (fos != null)
                    fos.close();
          return localFile;
      * Returns the file name associated to an url connection.<br />
      * The result is not a path but just a file name.
      * @param urlC - the url connection
      * @return the file name
      * @throws IOException Signals that an I/O exception has occurred.
     private static final String getFileName(URLConnection urlC) throws IOException {
          String fileName = null;
          String contentDisposition = urlC.getHeaderField("content-disposition");
          if (contentDisposition != null) {
               fileName = extractFileNameFromContentDisposition(contentDisposition);
          // if the file name cannot be extracted from the content-disposition
          // header, using the url.getFilename() method
          if (fileName == null) {
               StringTokenizer st = new StringTokenizer(urlC.getURL().getFile(), "/");
               while (st.hasMoreTokens())
                    fileName = st.nextToken();
          return fileName;
      * Extract the file name from the content disposition header.
      * <p>
      * See <a
      * href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html">http:
      * //www.w3.org/Protocols/rfc2616/rfc2616-sec19.html</a> for detailled
      * information regarding the headers in HTML.
      * @param contentDisposition - the content-disposition header. Cannot be
      *            <code>null>/code>.
      * @return the file name, or <code>null</code> if the content-disposition
      *         header does not contain the filename attribute.
     private static final String extractFileNameFromContentDisposition(
               String contentDisposition) {
          String[] attributes = contentDisposition.split(";");
          for (String a : attributes) {
               if (a.toLowerCase().contains("filename")) {
                    // The attribute is the file name. The filename is between
                    // quotes.
                    return a.substring(a.indexOf('\"') + 1, a.lastIndexOf('\"'));
          // not found
          return null;
     }

Similar Messages

  • How to get the long file name from an 8.3 name in Windows.

    Because of a legacy string limitation, I have a list of files in 8.3 format. The actual files are saved with long names. How can I get the long name from the short name?
    In JavaScript, I would get a file system object and get the file object from there with the short name. Then it's no problem to get the full name. But I don't see anything in Java that matches that. ???
    Ideas?
    Frank Perry, MSEE

    Here is what I did.
    String displayName = "somefi~1.txt";
    File fO = new File("c:\\"); // I have a more involved path but that's not important here.
    String stPath = fO.getPath() + displayName;
    File fD = new File(stPath); // get the file using the short name.
    File fDc = new File(fD.getCanonicalPath()); // get another file using the cononical name
    String FulldisplayName = fDc.getName(); // get the long name from there.
    It's roundabout but it works. Since getName() on the file read with the short name only returns the name used to get the file, I open it twice. The alternative is to parse the cononical name for the file name but that's clumbsy too.
    Frank

  • How to get list of file names from a directory?

    How to get list of file names from a directory?
    Please help

    In addition, this:
    String filename = files;Should be this:
    String filename = files;
    That's just because he didn't use the "code" tags, so [ i ] made everything following it become italicized.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get the Portal Page name from PLSQL?

    Can anyone tell me how to get the portal page name from my dynamic page using plsql?
    Apparently you can get the page id and work it out from there, but my calls to get the page id are not returning any values anyway.
    My code for attempting to get the page id is below.
    <oracle>
    declare
    v_pageid varchar2(30);
    begin
    v_pageid := wwpro_api_parameters.get_value('_pageid', '/pls/portal30');
    htp.print('Page is '|| v_pageid);
    end;
    </oracle>
    Ideally I'd actually just like to get the page name. Is there a straightforward way to do this?
    Thanks in advance!
    Sarah

    Few clarifications -
    1. wwpro_api_parameters cannot be used to get default portal
    page parameters such as '_pageid', '_dad', '_schema' etc.,
    2. Page information can be obtained through any components which
    are available in that particular page. For example, in case of
    dynamic page, we need to publish it as a portlet and add it to the
    page. This process creates necessary packages in the DB, but we
    will not have access to the portlet methods.
    So, I would prefer creating a simple DB provider & portlet and access
    page title from its show method as follows -
    //Declare local variable l_page_id, l_page_title as varchar2
    select page_id into l_page_id from wwpob_portlet_instance$ where
    portlet_id = p_portlet_record.portlet_id and
    provider_id = p_portlet_record.provider_id;
    select name into l_page_title from wwpob_page$ where id=l_page_id;
    More information on DB provider can be found at
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/understanding.database.providers.html
    Secondly, usage of wwpro_api_parameters.get_value method is
    incorrect. This method expects two arguments -
    <ul>
    <li><b>p_name : </b> The name of the parameter to be returned.</li>
    <li><b>p_reference_path : </b> An unique identifier for a portlet instance on the current page.</li>
    </ul>
    p_reference_path would be something like 99_SNOOP_PORTLET_76535103 and not some type of path as its name suggests.
    The following code fragment fetches all parameters available
    for a portlet.
    Note : Copy this code into 'show' method of your portlet.
    //Declare l_names, l_values as owa.vc_arr
    * Retreive all of the names of parameters for this portlet
    l_names := wwpro_api_parameters.get_names(
    p_reference_path=>p_portlet_record.reference_path);
    * Retreive all of the values of parameters for this portlet
    l_values := wwpro_api_parameters.get_values(p_names=>l_names,
    p_reference_path=>p_portlet_record.reference_path);
    //Loop through these arrays to get parameter information
    htp.p('<center><table BORDER COLS=2 WIDTH="90%" >');
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(wwui_api_portlet.portlet_heading('Name',1));
    htp.tableData(wwui_api_portlet.portlet_heading('Value',1));
    htp.tableRowClose;
    if l_names.count = 0 then
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.p('<td COLSPAN="2">'
    ||wwui_api_portlet.portlet_text(
    'No portlet parameters were passed on the URL.',1)
    ||'</td>');
    htp.tableRowClose;
    else
    for i in 1..l_names.count loop
    htp.p('<tr ALIGN=LEFT VALIGN=TOP>');
    htp.tableData(l_names(i));
    htp.tableData(l_values(i));
    htp.tableRowClose;
    end loop;
    end if;
    htp.p('</table></center>');
    Hope it helps...
    -aMJAD.

  • How to get the actual font name from a font file?

    Hi
    I have only the font Path I have to get the font name from that path. Any idea how to get the actual font name?
    Thanks,

    I would ask you these questions:
    Why do you need to do this?  What are you ultimately trying to accomplish?
    Are you really asking about the InDesign SDK?
    Do you really need to get the "name" of a font from an arbitrary file?  Or do you want information about a font installed on the system?  If so, what OS?
    Do you need to be able to handle any font format?
    Which font "name" do you mean?
    What language do you want the name in?
    (1) It's not clear what you're trying to accomplish.  A bit more information about your ultimate goal would be helpful.
    (2) This question is not at all specific to the InDesign SDK.  Are you really trying to do something in the context of an InDesign plug-in?  If so, you probably want to look at IID_IFONTFAMILY and the IFontFamily::GetFamilyName function.
    (3) If you are asking more generally, Windows and Mac both have system API calls to get this information, although those tend to deal with installed system fonts, not with arbitrary font files per se.
    Also, you can parse the name table from a True Type or Open Type font without using any system APIs; as True Type and Open Type are well-documented standards.  I would start by reading these:
    The Naming Table
    Font Names Table
    (4) Although there are other standards, such as Type 1 (PostScript) fonts, and True Type Collection files and other formats, especially on Mac.
    (5) Also, when you start down this road, you will quickly realize that your seemingly simple question is actually ambiguous, and that the answer is kind of complicated, because a font can have many names (a family name, a full font name, a style name, a PostScript name, etc.).
    (6) And not only does a font have multiple names, it can have each of those names in multiple languages and encodings.
    Any clarification would make this a better question.

  • How to get the Output File Name as One of the Field Value From Payload

    Hi All,
    I want to get the Output file name as one of the Field value from payload.
    Example:
    Source XML
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:MT_TEST xmlns:ns0="http://sample.com">
    - <Header>
      <NAME>Bopanna</NAME>
      </Header>
      </ns0:MT_TEST>
    I want to get the Output file name as " Bopanna.xml"
    Please suggest me on this.
    Regards
    Bopanna

    Hi,
    There are couple of links already available for this. Just for info see the below details,
    The Output file name could be used from the field value of payload. For this you need to use the UDF DynamicFile name with below code,
    //       Description: Function to create dynamic Filename
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    conf.put(key,a);
    return "";
    With this udf map it with the MessageType as
    (File Name field from Payload) > DynamicFileConfiguration>MTReceiver
    Thanks
    Swarup

  • How to get the failover partner name from C++ client

    Hi All,
    I have configured the mirroring session for my application.
    I want to modify the connection string with failover partner name.
    Could any one please let me to know how to get the failover partner instance from C++ client dynamically.
    Thanks,
    Prasad.

    Are you looking for this?
    http://www.connectionstrings.com/sql-server-2012/
    http://stackoverflow.com/questions/25534972/auto-failover-multiple-connections-to-mirror-database-when-principal-goes-down

  • How to get the SQL file name in SQL*plus

    hi all,
         I have created two sql file at C drive as "c:\Createtable.sql" and "c:\Deletetable.sql"
    afterwards i open
    C:\>sqlplus
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jan 30 11:37:10 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter user-name: scott/tiger
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> @C:\Createtable.sql'
    Table created.
    SQL> @'C:\Deletetable.sql'
    Table dropped.
    SQL>My problem is to get the name of the file as "c:\createtable.sql" and "C:\Deletetable.sql" in sql*plus enviornment.
    Thanks & Regards
    Singh

    Dear Damorgan,
         >>your version number to three decimal places
         My Oracle DB Version i have already stated in my previous post is 10.2.0.1.0
    Actually my problem is to get the sql files name we run in sqlplus enviornment with @ symbol. like
    i have created one sql file in c drive as
    "C:\Createtable.sql"
    afterwords i have connected to sqlplus as
    sql> conn scott/tiger
    sql>@c:\createtable.sql
    Now i want some query to get the name of the file which is run.
    In actual my problem is as
    i have suppose 10 or more SQL files in some folder ( sql1.sql, sql2.sql, sql3.sql ....).
    i created one file to call all the 10 sql files (main.sql)
    i have also one track_table which will keep track that which sql file is runned.
    I want some automated script which will insert the record in that track_table....... for that i need the name of sql file which is runned.
    Hope this will help you.
    Thanks & Regards
    Singh

  • How to get the pull path name from a file upload window

    Hello everyone!
    I have encountered the following problem with the following JSP code:
    <form method="post" action="filename.jsp">
    Upload JAVA program:
    <input type=file size=20 name="fname" accept="java">
    <input type=submit value="go">
    </form>
    <%
    String s = "";
    if (request.getParameter("fname") != null)
    s = request.getParameter("fname")
    %>
    The value of s is alway the filename. However I want to get the full path in addition to the filename, so that I can read the file. Does anyone know how to get the pull name of the file?
    thanks a lot in advance,

    Dear Sir,
    thanks a lot for your reply. Please let me explain what I intended to do: I want to upload a file from the local machine and then read the content of the file. Therefore I need to the fullpath of the filename like /var/local/file.java instead of file.java. The latter is what I got.
    The problem I have with your code is that the function like "request.getServerScheme()" is not recognized. Maybe is it because I didn't install servelet package? I only installed javax package btw. Also my application runns on Tomcat server if this could give you some information. The error message I had is as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:133: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    url = request.getServerScheme()
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:136: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    + ((("http".equals(request.getServerScheme()) && request.getServerPort() != 80)
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:137: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    ||("https".equals(request.getServerScheme()) && request.getServerPort() != 443))
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:139: cannot resolve symbol
    symbol : method getServletConfig ()
    location: interface javax.servlet.http.HttpServletRequest
    + "/" + request.getServletConfig().getServletName()
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:140: cannot resolve symbol
    symbol : variable path
    location: class org.apache.jsp.addExercise_jsp
    + "/" + path
    ^
    5 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

  • Mail to File - how to read the attachment file name from the subject.

    I need to use the SHeaderSUBJECT's value in the receiver file adapter's variable substitution.
    This is a Mail to File scenario without design part where the attachment file name comes in the subject of the mail.
    I see the below in the dynamicconfiguration section. How can i retrive the value from dynamicconfiguration section to the filename.
    <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
    <SAP:Record namespace="http://sap.com/xi/XI/System/Mail" name="SHeaderSUBJECT">PlainAttachment.txt</SAP:Record>
    </SAP:DynamicConfiguration>
    Points will be rewarded.

    Try to use sthg like this in a UDF :
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().getStreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create(“http://sap.com/xi/XI/System/Mail”,“SHeaderSUBJECT”);
    String value = conf.get(key);
    or in a JAVA mapping :
    DynamicConfiguration dynConf = (DynamicConfiguration) param.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey dynKey = DynamicConfigurationKey.create((“http://sap.com/xi/XI/System/Mail”,“SHeaderSUBJECT”);
    String keyValue = dynConf.get(dynKey);
    param is the map object from the execute() method of your mapping ...
    Hope this helps
    Chris
    Edited by: Christophe PFERTZEL on Apr 23, 2008 11:34 AM

  • How to get the right file name in an attachment

    I have design a program to get the attach file from an attachment. But when I click the link to save the file, the default name of the file is 'attach' whenever I get different files. Who know what is the problem, please tell me the truth.
    Here are some codes of the program.
    download.jsp
    <%="test.doc"%>
    web.xml
    <servlet-mapping>
    <servlet-name>AttachmentServlet</servlet-name>
    <url-pattern>attachment</url-pattern>
    </servlet-mapping>
    AttachmentServlet.java
    public void doGet
    Message msg = folder.getMessage(msgNum);
    // the message I get is right and the name of the file in
    // the attach in this message is right too.(I have printed)
    Multipart multipart = (Multipart)msg.getContent();
    Part part = multipart.getBodyPart(partNum);
    ContentType ct = new ContentType(sct);
    response.setContentType(ct.getBaseType());
    InputStream is = part.getInputStream();
    int i;
    while ((i = is.read()) != -1) {
    out.write(i);
    out.flush();
    out.close();

    The trick that I used is to append the URL with the name of the file. So if your url is "http://domain.com/attach", use "http://domain.com/attach/filename.doc". IE and Netscape parse the URL to determine what the filename is, so by placing this text at the end, you essentially let the browsers know what the filename is. :)
    I have design a program to get the attach file from an
    attachment. But when I click the link to save the
    file, the default name of the file is 'attach'
    whenever I get different files. Who know what is the
    problem, please tell me the truth.
    Here are some codes of the program.<< snip >>

  • How to get the original file name in chinese with upload component?

    It is inconvenience for user to upload file with name only in english. When upload a file with chinese file name, the file name gotten from "fileUpload1.getUploadedFile().getOriginalName()" is just like "&#32515;&#25120;&#31926;&#37733;&#65533;.jpg". Do somebody have a good idea?

    I spoke to the component engineers regarding this issue
    First please check if the s page encoding is set correctly, as browsers tend to default to use the encoding that was used for the page when submitting the request.
    (Because of how the JSF response writer is written, multibyte characters can be written correctly even if the encoding is not set correctly so the fact that form correctly rendered chinese characters is not proof that the encoding was set correctly).
    If you established that the page encoding is correct, then there is a
    bug in the FileUpload. The method that gets the name is a straight
    shot through to an Apache FileUpload library method. Technically this
    ought to be resolved by that method checking the request body
    character set before parsing the parameters.
    - Winston
    http://blogs.sun.com/roller/page/winston?catname=Creator

  • How to get the incoming file name using JMS adapter and SOAP adapter

    Hi Everybody,
       In one of my interface i need to get the file name of incoming flat file using JMS adapter at sender side. and then i am using xslt to convert it to IDOC and then posting to  SAP IDOC.
    my incoming filname are in this form price<DateTimestamp>.txt. when i do the tranformation this incoming file name should be part of one element in the IDOC which i am posting.
    EX:
    <IDOC
    <REF>price<DateTimestamp>.txt</REF>
    </IDOC>
    Hope it is clear to everybody. I need your suggestion how i can capture this incoming file name and send it as part of IDOC.
    Thanks
    raj

    If they are passing it in message id or correlation id,
    you can access it using
    <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/JMS', 'DCJMSMessageID/ DCJMSCorrelationID')" />
        <xsl:variable name="dynamic-value"
            select="dyn:get($dynamic-conf, $dynamic-key)" />
    Check this:
    http://help.sap.com/saphelp_nw70/helpdata/en/f4/2d6189f0e27a4894ad517961762db7/content.htm
    Thanks,
    Beena.

  • How to get the source file name and transform into database

    Hi,
    We need to load data from source file abc.csv into oracle table. during loading, we need to keep the file name abc.csv and write into the database table as one field. Is there anyone who did the similar task? and how to make it? Pls help!

    Hi,
    If you can write the filename to a text file, you may do the following:
    (1) create a text-file containing the name of your source-file.
    (2) create an external table using that text-file as input.
    Now, you can SELECT the filename from the external table.
    Of course, you need a way to : create the flat file, handle the flat file, etc.
    Grtz.

  • How to get the trace file name for current running application?

    Hi, I want to know if it is possible to get the file name directly for current running application instance which is launched by javaws.
    There is a property "deployment.user.logdir" tells the log directory, it would be great if a file name property
    is available. something like "instance.trace.file".
    Our application wants it because we would like our client send use the application log by clicking a "send error"
    button, the codes finds the trace file and compress it and send it by using a smtp server.
    In 1.5, we can do it by using a shell program.

    I found other asked it before, but I tried to set both properties, but neither works. my sun JRE version :java version "1.6.0_04"
    <property
    name="deployment.javaws.traceFileName"
    value="abcfefsfdsf"/>
    <property
    name="deployment.javapi.trace.filename"
    value="235235235"/>
    But it always write to one trace file with name lik javaws63645.trace

Maybe you are looking for

  • Problems with Viewing Canon EOS Rebel t1i Raw Files in Adobe PS and Bridge CS 4

    I am unable to preview the thumnails of my raw files from my Canon EOS Rebel T1i camera in Adobe Photoshop or Bridge (CS4)?  I've looked everywhere for a plugin? Am I unable to view these files in these programs. Please help. Thanks!

  • Solaris 8 x86 Shutdown

    Hello, I have installed the Solaris 8 Intel x86 edition. Now I have a (maybe silly) problem: I don't know how to shut down Solaris. I am working with the CDE desktop. When I am logging out from there, the desktop is closed and the entrance panel for

  • AOAG + Logshipping scenario

    Hi All, I have a scenario to perform AOAG (1 Sync and 1 ASync) totally 3 and log shipping in primary to another DC geographically different from primary replica, I use this to control log file growth also to keep a check on VLF and some delay in prod

  • Update Modem Firmware In OS X?

    I have a 450Mhz B&W G3 with the most current version of Tiger installed. I've NEVER tried using the modem that's built in, but now it's time to set it up for faxing. Does anyone know of a way to perform a firmware update with out taking the system do

  • I can't get my phone to go from Portrait to landscape view

    SInce I did the update to iOS7 my phone no longer switches to landscape when you turn it.