Downloading a file from a report link

I have a report link that sends a couple parameters to a secondary page.
The secondary page has a process in it that selects a blob file from a table and then downloads that file.
However, there is no browser download file dialog window that pops-up when the link is clicked.
The file just displays in the browser. So, I'm thinking I have something wrong with my MIME header.
The process that downloads the file is:
<code>
DECLARE
l_length NUMBER;
l_lob_loc BLOB := EMPTY_BLOB();
l_mime_type warm_files.mime_type%TYPE;
BEGIN
apex_application.g_page_text_generated := true;
apex_application.g_unrecoverable_error := true;
select blob_content, dbms_lob.getlength(blob_content), mime_type
into l_lob_loc, l_length, l_mime_type
from WARM_FILES
where context_id = :P12_CONTEXT_ID
and file_id = :P12_FILE_ID
-- set up HTTP header
OWA_UTIL.mime_header (l_mime_type, FALSE);
-- set the size so the browser knows how much to download
HTP.p ('Content-length: ' || l_length);
-- close the headers
OWA_UTIL.http_header_close;
-- download the BLOB
wpg_docload.download_file (l_lob_loc);
END;
</code>
The :P12 variables are the parameters coming in from the link.
There are no errors. The file just displays in the browser window.
Any clues as to what I'm missing are greatly appreciated.
Thanks in advance.
alan.
Edited by: semaphore on Dec 11, 2009 9:14 AM

Hi Alan,
try this...
This is my procedure which I adapted to yours...
<code>
DECLARE
l_length NUMBER;
l_lob_loc BLOB := EMPTY_BLOB();
l_mime_type warm_files.mime_type%TYPE;
l_file_name VARCHAR2(2000);
BEGIN
apex_application.g_page_text_generated := true;
apex_application.g_unrecoverable_error := true;
SELECT null,
BLOB_CONTENT,
name,
DBMS_LOB.GETLENGTH(blob_content)
INTO l_mime_type,
l_lob_loc,
l_file_name,
l_length
from WARM_FILES
where context_id = :P12_CONTEXT_ID
and file_id = :P12_FILE_ID;
-- set up HTTP header
owa_util.mime_header( nvl(l_mime_type,'application/octet'), FALSE );
-- set the size so the browser knows how much to download
HTP.p ('Content-length: ' || l_length);
-- the filename will be used by the browser if the users does a save as
htp.p('Content-Disposition: attachment; filename="'||substr(l_file_name,instr(l_file_name,'/')+1)|| '"');
-- close the headers
OWA_UTIL.http_header_close;
-- download the BLOB
wpg_docload.download_file (l_lob_loc);
END;
</code>
Hope it helps.
Regards, Zlatko Matanic

Similar Messages

  • Download CSV-File from Interactive Report

    Dear all,
    I want to download a CSV-File from a Interactive report.
    The content of the Rows in Excel:
    Erste,"B","C","D","E","F","G","H","I","J","K","L","M","N","O","P"
    IBC ->,"-","1","2","3","4","5","6","7","8","9","10","11","12","13","14" [...]
    How can I solve this problem?
    Thanks for help.

    Your CSV-File use "comma" as separator. But Excel think, that CSV-File separator is "semicolon".
    Try to set "CSV Separator"=";" in section "Report Attributes" - "Download".

  • ITunes keeps trying to download nonexistent file from Store, reports as "Corrupted"

    iTunes Match mis-matched one of my songs. It turns out it's from an album no longer carried in the iTunes Store. Through Customer Service, I obtained a credit to re-purchase the song from a different album.
    This was months ago. There hasn't been a problem - until now.
    Out of nowhere, iTunes started attempting to re-download the original song. The progress bar refills several times, then a pop-up dialog states the file is corrupted, and I should "Check Available Downloads" to try again. The track has even reappeared in my iTunes Library, albeit grayed out and with a "!" next to it.
    How do I convince iTunes and the iTunes Store that this is a non-existent track, and to stop trying to download it?

    I am having this issue as well, same error number and everything. Only one song too, the songs purchased before and after it download correctly. You have to press the report problem link specifically next to the song after pressing the initial report problem on your purchase history page.
    Not that Apple Support has done much for me yet, they claimed it was my ISP or something which is pure fabrication.

  • Downloading a file from a report in APEX 4.0

    I once wrote this in an old version of APEX where one had to deal with the wwv_flow_files ...
    I now have a page which allows me to upload a file into a blob as well as the mimetype and filename...
    But I cannot find APEX 4.0 documentation on how to get the correct URL in hte report to get to the file...
    I see the blob content is there etc ...
    But not sure how to build the p?n=#ID# part of the URL
    Any good links ???

    See About BLOB Support in Forms and Reports in the documentation.
    There's an OBE tutorial that followed the introduction of declarative BLOB support in 3.1 as well.

  • One field is missing in downloading the file from report

    Hi Friends,
    I have a problem with downloading the file from SAP.
    Actually the report has to download 6 fields from the list of the report to a .txt file on the presentation server. But it is downloading only 5 fields. The missing field is DEA#. Actually now i have to fix that problem.
    I found that in the download process they have not inlcuded the DEA# field.
    Here in this 1 field is not getting dowloading from the list of the report to the text file.
    I'm giving a portion of the code.
    Like this they r calling the FM:
    FORM DOWNLOAD_FILE.
      CALL FUNCTION 'DOWNLOAD'
           EXPORTING
                FILENAME = P_OUTFIL
           TABLES
                DATA_TAB = I_OUTPUT.
      IF SY-SUBRC <> 0.
        WRITE:/ 'Error downloading file'.
      ENDIF.
    in code we have,
    data: v_output type t_output,
    data: i_output type t_output occurs 0.
    and,
    BEGIN OF T_OUTPUT,
           RECORD(200),
           END OF T_OUTPUT.
    when i debug the program,
    the record field is showing only the 5 fields not the missing 6th filed)DEA#).
    and we have another FORM :
    *&      Form  FORMAT_FILE_WITH_TABS
          Insert tabs between fields so when uploaded in Excel, the
          record will be separated into columns where a tab is found.
    FORM FORMAT_FILE_WITH_TABS.
      LOOP AT I_KNA1 INTO V_KNA1.
        CONCATENATE: V_KNA1-KUNNR
                     V_KNA1-NAME1
                     V_KNA1-NAME2
                     V_KNA1-STRAS
                     V_KNA1-ORT01
                     V_KNA1-REGIO
                     V_KNA1-PSTLZ
           INTO V_OUTPUT SEPARATED BY C_TAB.
        APPEND V_OUTPUT TO I_OUTPUT.
        CLEAR V_OUTPUT.
      ENDLOOP.
    ENDFORM.                               " FORMAT_FILE_WITH_TABS
    If you look into this FM, there is no mention of DEA# field,
    i hve tried to correct it by adding the "v_likp_dea" in the FM. when i did like this it is showing the DEA# field in the downloaded .txt file but only 1 value for all the records.
    My question is for each record i have to show its unique DEA#.
    I guess i could do this by putting it in loop, could anybody tell me how i can i do that, Please
    Thank you very much.
    Raj.

    In the subroutine format_file_with_tabs ,
    You should read  it_likp with the key that uniquely identifies for dea# . This should be done in the loop at i_kna1.
    Suppose kunnr identifies a unique dea# in it_likp internal table , then you should write
    FORM FORMAT_FILE_WITH_TABS.
    LOOP AT I_KNA1 INTO V_KNA1.
    clear v_likp.
    read table it_likp into v_likp
       with key kunnr = v_kna1-kunnr binary search.   (should sort the itab to use binary search with read. )
    CONCATENATE: V_KNA1-KUNNR
    V_KNA1-NAME1
    V_KNA1-NAME2
    V_KNA1-STRAS
    V_KNA1-ORT01
    V_KNA1-REGIO
    V_KNA1-PSTLZ
    v_likp-dea
    INTO V_OUTPUT SEPARATED BY C_TAB.
    APPEND V_OUTPUT TO I_OUTPUT.
    CLEAR V_OUTPUT.
    ENDLOOP.
    ENDFORM. " FORMAT_FILE_WITH_TABS
    Message was edited by: Kalidas Cheroolil

  • Problems in Downloading a file from a web site using HttpClient

    Hi,
    My requirement is to download a file from a website using a java program. I have written a program using HttpClient API but I am unable to do so. Reality is that I don't know how to proceed with the HttpClient API to get the file downloaded. Same file can also be downloaded manually by login to that website, below mentioned steps are to be followed to download the file manually.
    1. Login to the website using Login/Password (I have valid login/password)
    2. Two options (links) are there (a) Report (b) Search [I am chosing report option]
    3. Newly opened window shows two tabs (a) Today (b) From & To [I am selection Today tab]
    4. Every tab has two radio button (a) File (b) Destination [Destination is selected by me]
    5. When Search button is pressed. A link gets created when that link is clicked file download popup is opened which allows facility to open/save the file.
    All these 5 step are to be followed in a java program to download the file. Please help in doing the same.

    // first URL which is used to open the website, this will have two text fields userName and password
    String finalURL = "http://www.xyz.in/mstatus/index.php";
    SMSGatewayComponentImpl obj = new SMSGatewayComponentImpl();
    obj.sendMessage(finalURL);
    public void sendMessage(String finalURL) {
    String ipAddrs = "a.b.c.d";
    int port = 8080;
    boolean flag = false;
    try {
    // Create an instance of HttpClient.
    HttpClient client = new HttpClient();
    HostConfiguration hostConfig = new HostConfiguration();
    hostConfig.setProxy(ipAddrs,port);
    client.setHostConfiguration(hostConfig);
    // Create a method instance.
    String cookieName=null;
    String cookieValue=null;
    // Here URL for the login page is passed and passing the user/password
    PostMethod method = new PostMethod(finalURL);
    method.setRequestHeader("userid","userName");
    method.setRequestHeader("passwd","pwd");
    // Execute the method.
    int statusCode = client.executeMethod(method);
    Cookie[] cookies = client.getState().getCookies();
    for (int i = 0; i < cookies.length; i++) {
    Cookie cookie = cookies;
    cookieName = cookie.getName();
    cookieValue = cookie.getValue();
    System.err.println(
    "Cookie: " + cookie.getName() +
    ", Value: " + cookie.getValue() +
    ", IsPersistent?: " + cookie.isPersistent() +
    ", Expiry Date: " + cookie.getExpiryDate() +
    ", Comment: " + cookie.getComment());
    NameValuePair[] respParameters = method.getResponseHeaders();
    String cookie = "";
    for(NameValuePair o : respParameters){
         System.out.println("Name : "+o.getName());
         System.out.println("Value : "+o.getValue());
         if("Set-Cookie".equalsIgnoreCase(o.getName()))
              cookie = o.getValue();
    NameValuePair[] footParameters = method.getResponseFooters();
    System.out.println("****************** Footer Values *******************");
    for(NameValuePair o1 : footParameters){
    System.out.println("Name : "+o1.getName());
    System.out.println("Value : "+o1.getValue());
    // This is jthe URL which comes when login/passowrd is entered and Login button is pressed.
    // I am trying to get the cookie from the first URL and pass this cookie for the second URL so that the session can be maintained
    // Here I may be wron..don't know is this the right way to download the file like this.....????
    finalURL = "http://www.xyz.in/mstatus/mainmenugrsms.php";
         method = new PostMethod(finalURL);
         method.setRequestHeader(cookieName,cookieValue);
         method.setRequestHeader("userid","userName");
         method.setRequestHeader("passwd","pwd");
         method.setRequestHeader("Set-Cookie",cookie);
         statusCode = client.executeMethod(method);
         respParameters = method.getResponseHeaders();
    for(NameValuePair o : respParameters){
    System.out.println("Name : "+o.getName());
         System.out.println("Value : "+o.getValue());
    // and this is the final URL which i got when that final link which enabled file download from the website have been copied as a shortcut and
    // pasted in a notepad. I was thinking that this will return the file as an input stream. but its not happening.
         finalURL = "http://www.xyz.in/mstatus/dlr_date.php#";
         method = new PostMethod(finalURL);
         method.setRequestHeader("Set-Cookie",cookie);
         method.setRequestHeader("userid","userName");
    // userid and passwd field are obtained when login/password page contents are seen using view source of that html
         method.setRequestHeader("type","1");
         // trying to set the cookie so that session can be maintained
    method.setRequestHeader(cookieName,cookieValue);
         method.setRequestHeader("passwd","pwd");
         statusCode = client.executeMethod(method);
         ObjectInputStream objRetInpuStream = new ObjectInputStream(method.getResponseBodyAsStream());
         System.out.println("objRetInpuStream : "+objRetInpuStream);
         if(objRetInpuStream!=null)
         System.out.println("objRetInpuStream available bytes : "+objRetInpuStream.available());
         String returnFile=(String)objRetInpuStream.readObject();
         System.out.println("Returned value \n : "+returnFile);
         respParameters = method.getResponseHeaders();
         for(NameValuePair o : respParameters){
         byte[] responseBody = method.getResponseBody();
         System.out.println("Response Body : "+new String(responseBody));
         if (statusCode != HttpStatus.SC_OK) {
              System.out.println("Error: " + method.getStatusLine());
         } else {
              System.out.println(method.getStatusLine());     
         } catch(Exception nfe) {
                   System.out.println("Exception " + nfe);
    Output
    =====
    /home/loguser/batch> sh run.sh SMSGatewayComponentImpl
    Classname : SMSGatewayComponentImpl
    run.sh[4]: test: 0403-004 Specify a parameter with this command.
    final URL : http://www.xyz.in/mstatus/index.php
    client is :org.apache.commons.httpclient.HttpClient@190e190e
    Cookie: PHPSESSID, Value: anqapu83ktgp8hlot06jtbmdf1, IsPersistent?: false, Expiry Date: null, Comment: null
    Name : Date
    Value : Thu, 06 May 2010 09:08:47 GMT
    Name : Server
    Value : Apache/2.2.3 (Red Hat)
    Name : X-Powered-By
    Value : PHP/5.1.6
    Name : Set-Cookie
    Value : PHPSESSID=anqapu83ktgp8hlot06jtbmdf1; path=/
    Name : Expires
    Value : Thu, 19 Nov 1981 08:52:00 GMT
    Name : Cache-Control
    Value : no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Name : Pragma
    Value : no-cache
    Name : Content-Length
    Value : 4792
    Name : Content-Type
    Value : text/html; charset=UTF-8
    Name : X-Cache
    Value : MISS from dcp.pas.abc.in
    Name : X-Cache-Lookup
    Value : MISS from dcp.pas.abc.in:8080
    Name : Via
    Value : 1.0 dcp.pas.abc.in:8080 (squid/2.6.STABLE21)
    Name : Proxy-Connection
    Value : keep-alive
    Cookie Value : PHPSESSID=anqapu83ktgp8hlot06jtbmdf1; path=/
    ****************** Footer Values *******************
    Name-2 : Date
    Value-2: Thu, 06 May 2010 09:08:47 GMT
    Name-2 : Server
    Value-2: Apache/2.2.3 (Red Hat)
    Name-2 : X-Powered-By
    Value-2: PHP/5.1.6
    Name-2 : Expires
    Value-2: Thu, 19 Nov 1981 08:52:00 GMT
    Name-2 : Last-Modified
    Value-2: Thu, 06 May 2010 09:08:47 GMT
    Name-2 : Cache-Control
    Value-2: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Name-2 : Pragma
    Value-2: no-cache
    Name-2 : Location
    Value-2: index.php
    Name-2 : Content-Length
    Value-2: 0
    Name-2 : Content-Type
    Value-2: text/html; charset=UTF-8
    Name-2 : X-Cache
    Value-2: MISS from dcp.pas.abc.in
    Name-2 : X-Cache-Lookup
    Value-2: MISS from dcp.pas.abc.in:8080
    Name-2 : Via
    Value-2: 1.0 dcp.pas.abc.in:8080 (squid/2.6.STABLE21)
    Name-2 : Proxy-Connection
    Value-2: keep-alive
    Cookie Value second time : PHPSESSID=anqapu83ktgp8hlot06jtbmdf1; path=/
    **Exception java.io.EOFException**
    Is my approach to download the file fromthe website ok????? please help me.

  • Downloading a file from App Server to User's Desktop

    Hi All,
    I know that there are many threads on file upload and download :-)
    I have tried to browse through most of them and could not find my solution.
    The requirement is to place a file in the unix app server directory and allow the user to download it using a link, to the user's desktop. In case you think that this has already been answered in an old thread, kindly give me the pointer. Any sample code for doing this, would be great.
    I know how to upload a file from desktop to table/app server. I know how to download a file from a BLOB column in database.
    Thanks,
    Amit

    You would not be able to use file upload or download beans, as they interact with the database and not the filesystem.
    You would need to write a simple file reader routing in plain java.
    Tapash

  • Bug:Downloading pdf file from the web,file name in dialog box populates with incorrect file name

    Hi Gurus
    When downloading any pdf file from the web using adobe Reader X the file name dialog box populates with incorrect file name
    compared to the saved file name of the document downloaded.
    Clarity
    1. Download any pdf file from the web
    2. Click File, Save as note the populated File Name
    3. Compare the populated file name with the saved file name of the documant yuo are downloading.
    4. The file Name is incorrect...
    Is there any work around on this issue?Can someone please help?..
    OS:Windows7
    Reader: Adobe Reader X
    I've tried a couple of other versions and still get the same results...

    Are you downloading the file (right-click, save link as), or just opening it by clicking it?
    If the latter, then what happens is the file is loaded to the temporary internet files folder by IE and assigned a temporary name, which is then used when you're trying to save it.
    You can test this out by going to File - Document Properties before trying to save and looking at the file's location.

  • How I could generate an XML file from a report in version 4.0B

    Good morning,
    How could I generate an XML file from a report? Please note that I am using version 4.0B
    I don't have access to
    Billy Vital

    Hi,
            In the Class CL_XML_DOCUMENT,
                 we have a method  EXPORT_TO_FILE to download an XML file.

  • Generated pdf file from oracle reports show bad characters

    Hello all,
    Iam fighting with a problem with generated pdf file from oracle reports which show some bad characters. I was searching for some information but it didnt help...
    I have Oracle Database 11g R2 (or 10g R2) on Oracle Linux or Windows, Oracle forms and reports 6i (i know that is very old and not supported with 11gr2 but we are in this scenario).
    NLS parameters are set like this
    server:
    NLS_CHARACTERSET EE8MSWIN1250
    NLS_TERRITORY AMERICA
    NLS_LANGUAGE AMERICAN
    client:
    NLS_CHARACTERSET EE8MSWIN1250
    NLS_TERRITORY SLOVAK
    NLS_LANGUAGE SLOVAKIA
    When I run Oracle Reports it show perfect in display and when I try to print them, they are all good with good characters, but when I try to generate pdf file, some characters like č,š,ľ are not displaying corectly... This happen only when try to generate to pdf...
    I try to work with uifont.ali on client side but without any result. Fonts for reports were installed on client and server side... Can someone help me with this problem? Thank you very much for every advice.
    Martin

    Hi Sergiusz,
    Thank you for your reply. I look at what you wrote and try to make some test...
    1) For first I download FontForge, which can generate type1 font from true type. So I open FontForge and open my Arial.ttf font and use "Generate Fonts" to save my Arial.ttf font to pfb and pfm (whoch are need to set in uifont.ali). I have to change encoding, because my font has 2byte encoding so I reecondode the font from ISO10646-1 to ISO8859-2 and generate to pfb.
    2) Then I navigate REPORTS_PATH from regedit to my *.pfm and *.pfb files.
    3) I add these lines to end of my uifont.ali
    [ PDF:Embed ]
    Arial = "Arial.pfm Arial.pfb"
    ArialNarrow = "ArialNarrow.pfm ArialNarrow.pfb"
    4) Then I generate my report but nothing change... I check "Font used" in my pdf file, but there were not my fonts embedded I guess..
    I also try PDF:Subset, but it doesnt change anything... I try PDF aliasing to see if my uifont is working - this work very well, but I dont need to change font...
    Any other advice? Thank you so much to everyone!
    Martin

  • When i download a file from the web i get "Anti-Virus Program not found " message. This has been happening since I change anti-virus programs for CA etrust to Sophos. How do I get Firefox to recognise my new Anti-virus program?

    every time i download a file from the web (ie. a PDF file) i get "Anti-Virus Program not found " message. This has been happening since I changed anti-virus programs for CA etrust to Sophos. How do I get Firefox to recognise my new Anti-virus program?

    That is a very good warning provided by the Download Statusbar extension. Something like that should been built into Firefox. I filed this Bug report a couple of years ago, about the lack of a warning like that. <br />
    https://bugzilla.mozilla.org/show_bug.cgi?id=480855 <br />
    I have looked everywhere that I can think of to find a list of '''IOfficeAntiVirus providers''' ''(as mentioned in the Bug report)'' that will work with Firefox, so I can't answer that for you.
    You might want to ask the developer of the Download Statusbar extension about it. He might know which AV programs are compatible with the Windows API that Firefox uses for the download scan. <br />
    http://dlstatusbar.proboards.com/index.cgi? <br />

  • Cannot download any files from Safari 6.0.1 (Mountain Lion)

    Hi, I have had an ongoing issue with downloading files from Safari 6.0.1. When I click any links (even from emails) to download various files from pdfs, zips to photos, firmware etc, Safari opens a new tab with the file URL in the navigation bar. However, the tab is a blank gray window, and the download does not begin. I have been copy pasting the links into firefox and the downloads work fine. Would rather be using safari though and its rather annoying to be opening a separate browser anytime I need to download a file. Any ideas?
    Thanks.

    Select Help ▹ Installed Plug-ins from the Safari menu bar. Besides the following, what plugins are listed?
    iPhotoPhotocast
    Java
    QuickTime
    Shockwave Flash
    WebKit built-in PDF

  • Can I download RAW Files from Canon5D (Mk1) in LR4 ?

    I have heard reports that LR4 cannot be used to download files from Canon 5D (Mk1).....is this true ?
    Also why do I have to upgrade from LR3.6 to LR4 just so I can download RAW files from Canon G1X camera?......  for one who obtains no income from photography the continual costly upgrades are ridiculous !!!

    Some people seem to like making Adobe the villain in this dilemma/issue. You don't have to have any version of Lightroom to download or work on your raw files. Software was included with your camera that will do that. The problem is that the camera maker wants to sell cameras, not software. So they don't devote the time to making the software everything that it could be. And since most camera makers insist on using proprietary file formats, it imposes a hardship on Adobe and other third-party developers to keep up with the demand.
    Providing support for new cameras isn't the only development that goes on with the Lightroom team. They are constantly looking for ways to improve the process. When a major version of Lightroom is released there has to be an expense to upgrading. Otherwise, there would be no development, no improvement, just stagnation.
    But, as has been mentioned, if your camera is not supported in Lightroom 3.6, Adobe provides free of charge the DNG converter. It will convert your images to DNG (Digital negative) files that can be opened in the software that you already have. When a new major version of Lightroom is released, development on the previous version ceases. Support for cameras that are introduced has to be done on a model basis, not just the file format. So if you purchase a new camera and want support from software that you are accustomed to using, you should expect to upgrade to get that support. The move from Lightroom 3.6 to 4.1 will provide you with a lot more than just added support for new cameras. The new process is much more refined and can produce superior results. If that isn't of value to you then simply use the DNG converter.

  • Download APK files from Google Play Store

    If you want original APK files from Google Play store then do the following steps.  1) open the official website of Google play Store.  2) here no need to sign in with your gmail account, simply select the app/game whose APK file you desire to download. 3) Copy the URL link of the app/game.  4) Now in new window or tab open  Evozi's official website (http://apps.evozi.com) . 5) Now in this new website paste the URL of your desired app on Play Store. 6) Click Generate Download Link (click it until you you see "Click here to Download.....") (Coutesy: http://www.techprobex.com/2013/12/how-to-download-apk-files-from-google.html

    Nice

  • How can i download many file from server one times.

    Hi,
    I want to create the service to download multi-files from web server one time
    from browser. It seems no way to do it. My soulition is compressing the files
    to zip before download it. The problem is that when the user uncompresses the
    files,full path of downloaded files are setted. Look like this:
    /usr/tmp/test/file1
    /usr/tmp/test/file2
    /usr/tmp/test/file3
    My question is :
    1. Is there any way not to specify the full path of a file when
    add the file to zip.
    Here is the source
    BufferedInputStream bis
    = new BufferedInputStream(
    new FileInputStream( file ) );
    //if not full path . can is works?????
    ZipEntry target = new ZipEntry( file.getPath() );
    // zos is ZipOutputStream
    zos.putNextEntry( target );
    int c;
    while( ( c = bis.read() ) != EOF ) {
    zos.write( (byte)c );
    2. Is there any way to get and change the current work directory of my server ?
    Please help!!

    If i use file.getName(). I will lost the struct of path.
    I means that,if i compress the list of files:
    /usr/tmp/test1/file1
    /usr/tmp/test1/file2
    /usr/tmp/test2/file3
    can i keep the part of path's strcut. (usr/tmp/../.. etc.)
    I tried to do as this:
    target = new ZipEntry( file.getPath.substring(1));
    an error be reported when uncompressed the zip file.
    error message:
    warning [zt000002.zip]: extra 28 bytes at beginning or within Zip file (attempting to process anyway)
    Error in file #1: bad Zip file offset (Error local header signature not found): 0
    (attempting to re-compensate)
    Extracting 20030109.xls
    Error: unexpected end of file encountered
    Error: invalid compressed data to inflate
    Why? can i set "any" entry name??

Maybe you are looking for