Error in reading the contents of a zip file

EHello Experts,
I want to read the contents of a zip file.I have written the following program which reads the contents of a file named "index.xml" which resides in ReadZip.zip.My problem is , it is reading only the first line of that file & after that it is giving this error.
java.io.IOException: Stream closed
at java.util.zip.ZipInputStream.ensureOpen(ZipInputStream.java:43)
at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:67)
at components.ReadZipFile2.main(ReadZipFile2.java:26)
public class ReadZipFile2 {
    public static void main(String args[]) {
        try {
            FileInputStream fis = new FileInputStream("C:\\ReadZip.zip");
            ZipInputStream zis = new ZipInputStream(fis);
            ZipEntry ze;
            while ((ze = zis.getNextEntry()) != null) {
                System.out.println(ze.getName());
                if (ze.getName().equals("ReadZip/index.xml")) {
                    long size = ze.getSize();
                    if (size > 0) {
                        System.out.println("Length is " + size);
                        BufferedReader br = new BufferedReader(
                                new InputStreamReader(zis));
                        String line;
                        while ((line = br.readLine()) != null) {
                            System.out.println(line);
                        br.close();
        } catch (IOException e) {
            e.printStackTrace();
}It seems that zis is getting close after reading the first entry of file.I am unable to guess the reason for this.Please help.Thanx in advance.

[redacted confused advice]
[_Compressing and Decompressing Data using Java - with many code samples_|http://java.sun.com/developer/technicalArticles/Programming/compression/|Yes Virginia, there really are code samples]

Similar Messages

  • How to read the content of this excel file in LV

    Hi could you please let me know how can I read the content of this excel file using the Read From Speardsheet function. It contains text and numbers
    Thanks
    The excel file is attached
    Attachments:
    Datalogging.zip ‏307 KB

    Check attached VI.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    ReadFromExcel.vi ‏27 KB

  • How to read the content of a text file (by character)?

    Guys,
    Good day!
    I'm back just need again your help. Is there anyone knows how to read the content of a text file not by line but by character.
    Please help me. Thank you so much in advance.
    Jojo

    http://java.sun.com/javase/6/docs/api/index.html
    package java.io
    InputStream.read(): int
    Reads the next byte of data from the input stream.
    Implementation:
    InputStreamReader
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.

  • Can a search engine read the contents of a Library file embedded in a page?

    Can a search engine read the contents of a Library file
    embedded in a page? Or would SSI be the way to go. I'm creating a
    large library of text-based information and links, and I want to
    have much of it modular so I can add a link and all the many pages
    on my site updates to reflect the change. A big concern is that
    when a search engine visits my site, can it read the content
    embedded in the library item, or is SSI a better method to help the
    search engine read my content?
    Thanks

    Yes, search engines can read Dreamweaver library items. The
    library only exists on your own hard drive. Once you add the
    library item to your pages it's in there as regular HTML.
    If you have more than 20 pages on your site, they say SSI is
    better, because when you update you only update the SSI. If you
    stick with library items each page has to be uploaded every time
    the library is updated.

  • How to read the content of ms-word file use pure java???

    how to read the content of ms-word file use pure java???

    hi,
    check this: http://jakarta.apache.org/poi/

  • Problem of reading the content of this .txt files

    currently i have a problem of reading the content of this file castle.txt
    #Server Ready.
    Lee Siaw Kang 50256808:08:382004/03/15Abdul Rahman 60296008:13:242004/03/15Kenneth Lee 60299308:13:532004/03/15Ho Kid Peng 31337508:17:442004/03/15Tonny Sherbern 50271108:19:132004/03/15Frederick Foh 50257908:20:212004/03/15Jason Kho 61702908:21:312004/03/15Lois Lee Liarn Huee 61897408:22:522004/03/15Victor Palau Udih 31337308:23:202004/03/15Michelle Sim 61899008:27:412004/03/15Alan Hong 50262708:30:312004/03/15Frederick Foh 50257908:33:412004/03/15Douglas Aseng 50255808:36:442004/03/15Atika Abang 31347508:36:592004/03/15David Dzrandinuraidi 61239608:38:012004/03/15Sentia Brangking 61896808:39:502004/03/15Dinah Samuel 61704608:40:582004/03/15Dr. Anderson Tiong 61702508:42:102004/03
    it is something like this ...i want to break it into readable format ...i have tried vector with is the following code.
    import java.util.*;
    import java.io.*;
    public class parseCastle {
    public static Vector parseInfo(String str) {
    int recordSize = 59;
    Vector v = new Vector();
    for (int i=0; i<str.length(); i+=recordSize) {
    String str1 = str.substring(i, i+recordSize);
    Vector vi = new Vector();
    vi.addElement(str1.substring(0, 35));
    vi.addElement(str1.substring(35, 41));
    vi.addElement(str1.substring(41, 49));
    vi.addElement(str1.substring(49, 59));
    v.addElement(vi);
    return v;
    //constructor
    parseCastle(){
    try
    FileInputStream fin = new FileInputStream("castle.txt");
    File fprop = new File("castle.txt");
    byte[] data = new byte[(int)fprop.length()];
    int total = fin.read(data);
    if (total != data.length) {
    System.err.println("Error loading file");
    return;
    //System.out.println(data.length);
    Vector v = parseInfo(new String(data));
    for (int i=0; i<v.size(); i++) {
    Vector vi = (Vector)v.elementAt(i);
    for (Enumeration e = vi.elements(); e.hasMoreElements();)
    System.out.println(e.nextElement());
    System.out.println();
    //*** Alternative ***
    //for (int k=0; k<vi.size(); k++)
    // System.out.println(vi.elementAt(k));
    catch (IOException e)
         System.out.println("Error: "+e);
         e.printStackTrace();
    But it gave me error. like it exceeds array boundary...can someone expert help me out

    You should be aware that these kind of effort always involves certain amount of risk because the proper record format is not hundred percent guaranteed. So, make sure to use properly formatted file, or genuine database instead.
    import java.io.*;
    import java.util.regex.*;
    public class ParseCastle2{
      public static void main(String[] args) throws Exception{
        String line, data;
        BufferedReader br = new BufferedReader(new FileReader("castle.txt"));
        br.readLine(); //discard #Server Ready line
        line = br.readLine();
        Pattern pat = Pattern.compile("([ .A-Za-z]+)([/0-9:]+)");
        Matcher mat = pat.matcher(line);
        Pattern subPat = Pattern.compile("(\\d+):(\\d\\d:\\d\\d)(.+)");
        while (mat.find()){
          System.out.println(mat.group()); // if name only, use group(1) ... beware trailing space
          data = mat.group(2);
          Matcher subMat = subPat.matcher(data);
          while (subMat.find()){
            System.out.println(" cdID = " + subMat.group(1));
            System.out.println(" Time = " + subMat.group(2));
            System.out.println(" Date = " + subMat.group(3));

  • Help on how to read the content of an XML file from the payload

    I have a receiver channel / mail adapter, that sends e-mails with a XML attachment.
    I’m trying to write a Bean, that should make it possible to rename the attached XML file dynamically.
    In the Bean I want to read the content of the attached XML file, it could be the “order number”.
    The filename should then be “Order number”.XML.
    <u><i>Can anyone help me with how to read the content of the XML file from the payload.</i></u>
    <i><b>Frank</b></i>

    hi,
    check this: http://jakarta.apache.org/poi/

  • I want to read the content of a text file dropped in a watched folder into a string variable

    I have a workbench process with 2 variable.
    inDoc (DataType=Document/input/required)
    outStr (DataType = String/output)
    The document being passed to the workflow is a text file with 4 lines of text in it.  when the text file is dropped into the watched folder, it will be assigned to the inDoc parameter in the workflow.
    My workflow needs to extract the 4 lines of text and write it into a string (outStr).
    Id like to use the FileUtilsService.ReadString service but i can't since its input parameter is the file path.  When i do, i get the following error...
    Caused by: ALC-FUT-001-011: File rO0ABXNyABZjb20uYWRvYmUuaWRwLkRvY3VtZW50yAEFUxsO+CEDACNJAAtfY2FsbGJhY2tJZFoADV9kZXNlcmlhb Gl6ZWRJABBfZGlzcG9zYWxUaW1lb3V0WgAJX2Rpc3Bvc2VkWgAZX2lzRGlzcG9zYWxUaW1lb3V0RGVmYXVsdFoAE19 pc1RyYW5zYWN0aW9uQm91bmRKAAdfbGVuZ3RoSQAOX21heElubGluZVNpemVaAAhfb3duRmlsZVoAC19wYXNzaXZhd GVkWgALX3BlcnNpc3RlbnRJABFfc2VuZGVyQ2FsbGJhY2tJZFoAEV9zZW5kZXJQYXNzaXZhdGVkWgARX3NlbmRlclB lcnNpc3RlbnRJAA5fc2VuZGVyVmVyc2lvbkkABl9zdGF0ZUwAC19hdHRyaWJ1dGVzdAATTGphdmEvdXRpbC9IYXNoT WFwO0wACF9jYWNoZUlkdAAfTGNvbS9hZG9iZS9pZHAvRG9jdW1lbnRDYWNoZUlEO0wADF9jYWxsYmFja1JlZnQAIUx jb20vYWRvYmUvaWRwL0lEb2N1bWVudENhbGxiYWNrO0wADF9jb250ZW50VHlwZXQAEkxqYXZhL2xhbmcvU3RyaW5nO 0wAC19kYXRhQnVmZmVydAAeTGNvbS9hZG9iZS9zZXJ2aWNlL0RhdGFCdWZmZXI7TAAPX2V4cGlyYXRpb25UaW1ldAA QTGphdmEvbGFuZy9Mb25nO0wABV9maWxldAAOTGphdmEvaW8vRmlsZTtMABBfZ2xvYmFsQmFja2VuZElkdAAhTGNvb S9hZG9iZS9pZHAvRG9jdW1lbnRCYWNrZW5kSUQ7WwAHX2lubGluZXQAAltCTAAMX2lucHV0U3RyZWFtdAAVTGphdmE vaW8vSW5wdXRTdHJlYW07TAAPX2xvY2FsQmFja2VuZElkcQB+AAhMAAxfcHVsbFNlcnZhbnR0ACRMY29tL2Fkb2JlL 2lkcC9JRG9jdW1lbnRQdWxsU2VydmFudDtMABFfcmFuZG9tQWNjZXNzRmlsZXQAGkxqYXZhL2lvL1JhbmRvbUFjY2V zc0ZpbGU7TAAVX3NlbmRlckNhbGxiYWNrUmVmSU9ScQB+AARMABZfc2VuZGVyR2xvYmFsQmFja2VuZElkcQB+AAhMA A1fc2VuZGVySG9zdElkcQB+AARMABVfc2VuZGVyTG9jYWxCYWNrZW5kSWRxAH4ACEwAGl9zZW5kZXJQdWxsU2VydmF udEpuZGlOYW1lcQB+AARMAARfdXJsdAAOTGphdmEvbmV0L1VSTDt4cHcGAAAAAwAAcHd1AHMwOjA6MDowOjA6MDowO jEvMTI3LjAuMC4xLy8vLy8vLy8vZmU4MDowOjA6MDo3NDMyOmU0OWQ6NmUzMToxNTU0JTEwLzEwLjI0LjIzOS4xMjY vZmU4MDowOjA6MDowOjVlZmU6YTE4OmVmN2UlMTEvLy8vdXIAAltCrPMX+AYIVOACAAB4cAAAAcRJTU01MjU3XzAxL TIwMTFfMXwwMXx8YXx8fHxGZW1hbGV8MjAwMHw2fDh8Y3wyNTZ8MjU2fDkxMnwwMXx8fHx8fHx8Tnx8fHx8fHx8fHx 8fHx8fHx8fHxZfHx8fHx8fHx8fDAyfHx8fHx8TnwyMDEyfDJ8MTR8DQpJTU01MjU3XzAxLTIwMTFfMnx8fHx8fHx8f Hxhc2RmfDI1NnwyMDEyfDAyfDAxfDIwMTJ8MDN8MDJ8fHx8YXxhfDI1Mnx8fHxZfHx8fHx8fHx8fHx8fHx8DQpJTU0 1MjU3XzAxLTIwMTFfM3xOfHx8fHx8fHx8fDIwMDB8Nnx8fGFzZGZ8YXNkZnxhc2RmfDI1Nnx8fHx8fHx8fHx8fHx8f Hx8fHx8DQpJTU01MjU3XzAxLTIwMTFfNHxOfE58fE58TnxOfHxOfE58fE58TnxOfA0KSU1NNTI1N18wMS0yMDExXzV 8U2luZ2xlfDAxfHwyMDEyfDAyfDE4fDIwMTJ8MDN8MDN8MjM0fGFzZGZ8fGFzZGZhc3x8fHxFeGNoYW5nZS1Qcm8uO S40MDEuRnVsbC5XSU4uZW5fQ0EuRU5VLTEwLTIwMTF8DQoNCnBwdwYAAAAAAAB0AAp0ZXh0L3BsYWlucHNyABFqYXZ hLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAA AADdAAKd3NmaWxlbmFtZXQAJ0M6XFVzZXJzXENodWxseS5QYXJrXERlc2t0b3BcaGRzY2FuLnR4dHQACGJhc2VuYW1 ldAAKaGRzY2FuLnR4dHQABGZpbGVxAH4AFXh3NwAtYWRvYmUvaWRwL0RvY3VtZW50UHVsbFNlcnZhbnQvYWRvYmVqY l9MQ19ERVYx//////////94 does not exist.
    at com.adobe.livecycle.fileutils.FileUtilsService.readDocument(FileUtilsService.java:363)
    which is what i expected...
    I've also tried with the Script.executeScript to call some java code but im not too strong in java and in all the examples i find, the file pointer requires a file path.
    import java.io.*;
    FileInputStream f = new FileInputStream(patExecContext.getProcessDataValue("/process_data/inDoc"));
    OR
    File f = new File(patExecContext.getProcessDataValue("/process_data/inDoc"));
    OR
    File f = patExecContext.getProcessDataValue("/process_data/inDoc");
    Any clue how to resolve my problem?

    Try the following code snippet to read the String content from the file recieved through watched folder endpoint.
    com.adobe.idp.Document inputDoc = patExecContext.getProcessDataDocumentValue("/process_data/inDoc");
    java.io.InputStream inStream = inputDoc.getInputStream();
    byte[] dataBuffer = new byte[inStream.available()];
    inStream.read(dataBuffer);
    String strData = new String(dataBuffer);
    patExecContext.setProcessDataStringValue("/process_data/outStr",strData);
    The code is not tested, hence if you find any mistakes, correct and test the functionality.
    Nith

  • URGENT: How to read the content of a PDF-file in Java?

    Hello
    What I need are some classes which can read a pdf and translate it in normal Text, so that I can write the content of the pdf in my database.
    Where can I find those classes? Or how else could I get there?

    www.lowagie.com/itext
    www.etymon.com/pj
    www.retep.org.uk/pdf
    www.pdflib.comwww.pdfzone.com
    www.planetpdf.com
    www.purepdf.com
    www.adobe.com
    www.pdfstore.com
    www.adobe.com/proindex/acrobat/formsresources.html
    www.partners.adobe.com/asn/developer/acrosdk/forms.html
    www.rrsys.com
    www.javafoundry.com/javapdf
    www.novagraphix.com/internet_publishing_with_acrobat/forms/forms_tutorial.html
    www.binarything.com

  • How to read the contents of a text file and populate the data in a table ?

    Hello All,
      Can anyone advise on how to acheieve the above ? I am trying to read in a text file (CSV) and have the contents populated to the respective UI elements in a table. Any help is greatly appreciated.
    from
    Kwok Wei

    Hi,
    Let us consider you have list of names(Seperated by delimeter) in a text file and you want to display in  a table.
    1. Create Context Node "Names" and context attribute "Name"
    2. Create Table and bind to the above context.
    3.Write the following code in the "Init method.
    try{
    FileReader f =new FileReader("");
    BufferedReader r=new BufferedReader(f);
    String names=r.readLine();
    Vector Names=new Vector();
    // Use Tokenizer and store all the names i a vector//
    for(int i=0;i<Names.size();i++){
    IPrivate<<VieName>>.INameElement ele=wdContext.createNameElement();
    ele.set<<Name>>( Names.get(i).toString());
    wdContext.NodeName().addElement(ele);
    Regards, Anilkumar
    Message was edited by: Anilkumar Vippagunta

  • VBScript to read the content of a .csv file and delete old files mentioned in the .csv

    I have a Windows 2003 file server.
    I have generated a report in .csv format, about the files which are older than 1 year.
    I need a VBScript to read the .csv file and delete the files which are enlisted there.
    Can someone please help me with this?

    Look into the "Learn" link above.  There are resources and instructions on how to write VBScript code.  Look into how to use the FileSystemObject.
    ¯\_(ツ)_/¯

  • Read the content of a properties file

    I have a properties file(.properties), which has contents in this format:-
    [1]TYPE=4
    [1]ENABLED=TRUE
    [1]Caption = "Kozos"
    [1]URL=https://kozos.com/access
    I want to display the value of url for kozos and when i try below code, i get an error :- 
    ConvertFrom-StringData : Data line 'D:\kozos.properties' is not in 'name=value' format. 
    Clear-host
    $FileName = "D:\kozos.properties"
    $file_content = $FileName -join [Environment]::NewLine
    $configuration = ConvertFrom-StringData($file_content)
    $environment = $configuration.'kozos'
    Write-host "Environment is $environment"

    The data you initially gave had more than that (Type and Enabled) which is what I was going on. From what I understand, you only want the Caption and associated URL available? Do you actually need the numbers from the file ([1],[2], etc...)? Here are a couple
    of alternative approaches (which may be changed depending on your feedback regarding my questions).
    $Configuration = [pscustomobject][hashtable](ConvertFrom-StringData (((Get-Content .\kozos.properties) -replace '\[.*\]') | Out-String))
    ($Configuration | Where {$_.Caption -match '"kozos"'}).url
    $Configuration = (ConvertFrom-StringData (((Get-Content .\kozos.properties) -replace '\[.*\]') | Out-String))
    $hash = @{}
    $Configuration | ForEach {
    $hash[($_.caption -replace '"')] = $_.url
    $hash.Kozos
    Others may have alternative approaches to this as well.
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book
    Boe,
    I want only the Caption and the url associated with it. I ran your code, this is the error i got :-
    ConvertFrom-StringData : Data item 'TYPE' in line 'TYPE=14' is already defined.  
    THis is what the properties contains :-
    [1]TYPE=4
    [1]ENABLED=TRUE
    [1]Caption = "Kozos"
    [1]URL=https://kozos.com/access
    [2]TYPE=4
    [2]ENABLED=TRUE
    [2]Caption = "Kozos1"
    [2]URL=https://kozos1.com/access
    [3]TYPE=4
    [3]ENABLED=TRUE
    [3]Caption = "Kozos"
    [3]URL=https://kozos.com/access and
    goes till 100.
    I apologise for not mentioning this on top.

  • Issue in reading the contents of the file

    Hi all,
            How to read the contents of a text file and assign it to a single context variable and sent it to database I am using File upload control to upload the file. Up to my thing file upload control will give us the path of the file. We need to get the url and read it from it. If i am wrong please correct me and give suggestion to solve this.
    Thanks in advance.

    On UPLOAD click do this:
      public void onActionLoadFile(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionLoadFile(ServerEvent)
         WDWebResourceType FileType = null;
         String FileName = new String();
              //get attribute info for context attribute 'FileUpload'
              IWDAttributeInfo attributeInfo =
                   wdContext.getNodeInfo().getAttribute(
                        IPrivateEmailView.IContextElement.FILE_UPLOAD);
              //get modifiable binary type from the attribute info,requires type cast.
              IWDModifiableBinaryType binaryType =
                   (IWDModifiableBinaryType) attributeInfo.getModifiableSimpleType();
              IPrivateEmailView.IContextElement element =
                   wdContext.currentContextElement();
              //if a file in the 'FileResource' attribute exists
              if (element.getFileUpload() != null) {
                   try {
                        String mimeType = binaryType.getMimeType().toString();
                        byte[] file = element.getFileUpload();
                        //get the size of the uploaded file
                        element.setFileSize(this.getFileSize(file));
                        //get the extension of the uploaded file
                        element.setFileExtension(binaryType.getMimeType().getFileExtension());
                        //NOTE: context attribute 'FileName' must not be set
                        //because the FileUpload-UI-element property 'fileName'
                        //is bound to it. Consequently the fileName is automatically
                        //written to the context after file upload.
                        //report success message
                        wdComponentAPI.getMessageManager().reportMessage(
                        IMessageEmailComp.SF_UPLOAD,
                             new Object[] { binaryType.getFileName()},
                             false);
                        FileType = binaryType.getMimeType();
                        FileName = binaryType.getFileName();
                   } catch (Exception e) {
                        throw new WDRuntimeException(e);
              //if no file in the 'FileResource' attribute exists
              else {
                   //report error message
                   IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
                   msgMgr.reportContextAttributeMessage(
                        element,
                        attributeInfo,
                        IMessageEmailComp.NO_FILE,
                        new Object[] { "" },
                        true);
              //clear the FileResource context value attribute
              //element.setFileUpload(null);
              String URL;
              URL = this.CreateAndGetPathFileUpload(
                                  wdContext.currentContextElement().getFileUpload(),
                                                      FileName);
    //          if (URL.length() == 1){
    //               //ERROR
         wdContext.currentContextElement().setPATHFileUploaded(URL);
        //@@end
      private String CreateAndGetPathFileUpload(byte[] FileUpload, String FileName){
           String URL = new String();
         try {
              FileOutputStream fos = new FileOutputStream(FileName);
              fos.write(FileUpload);
              fos.close();
         } catch (FileNotFoundException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         } catch (IOException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
         File fl = new File(FileName);
         URL = fl.getAbsolutePath();
           return URL;
    Forgot the method that give you the URL file.
    Message was edited by: Roberto Tagliento

  • Want to upload PDF file in UI, read the content of PDF and Store in SAP DB

    Hi Experts,
    I have a new requirement in SAPUI5. I want to upload an PDF file using FileUploader component. Now how to validate this thing only for PDF file. User can only upload PDF file.
    Next I want to read the content of this PDF file and want to save data in SAP table. For this requirement, how to read the content of that file? After reading how to save the content in SAP table?
    To achieve this, how to design the ODATA service?
    Any kind of suggestion would be acceptable gratefully.
    Thanks in advance...
    Regards,
    Arindam Samanta.

    Hi Peter,
    Thanks once again for your kind response.
    I am getting the value in SLUG parameter and I can get the value in slug.
    Now I am getting errors from front end side, saying -
    1.   
    sResponse;
    "<pre style="word-wrap: break-word; white-space: pre-wrap;">CSRF token validation failed</pre>"
    2.POST http://------/CTC_MIBL_17072014/proxy/sap/opu/odata/sap/ZGW_CTC_VEHICLE_SRV/AS_CTC_MIBL_SET 403 (Forbidden)
    - Method 'AS_CTC_MIBL_SET_GET_ENTITYSET' not implemented in data provider class.
    Below is my code -
    // For File up-loader
    oFileUploader1 = new sap.ui.commons.FileUploader("upload",{
                    name : "test1",
                    uploadOnChange : false,
                    width : "250px",
                    uploadUrl : uploadURI,
                    uploadComplete: function (oEvent) {
                                     var sResponse = oEvent.getParameter("response");
                                     if (sResponse) {
                                       //  oUploadDialog.close();
                                         sap.ui.commons.MessageBox.show("Return Code: " + sResponse, "Response", "Response");
    // On Submit click
    oFileUploader1.insertParameter(new sap.ui.commons.FileUploaderParameter({name: "slug",
       value: oFileUploader1.getValue() }));
      oFileUploader1.insertParameter(new sap.ui.commons.FileUploaderParameter({name: "x-csrf-token",
       value: header_xcsrf_token }));
      oFileUploader1.upload();
    Could you please give some idea regarding my above mentioned issues?
    Thanks In advanced.
    Regards,
    Arindam Samanta.

  • To Read the contents of the properties file which is located in webserver

    Hi,
    I have one requirement where I have to read the contents of a property file which is located in some path in server. Say for example, when you click on link abcd then contents of abcd.properties file should be displayed in one text view in webdynpro . I am trying to implement this in webdynpro for java. The main thing is like I am not able to retrieve the server path of the file and hence not getting the file contents. I tried using methods like  getApplicationPath() or getRealPath() but its not working. So can you guys please help me on to how to read the server file contents.
    Thanks and regards,
    Sai

    Hi Romano,
    Thanks a lot for your reply. However, I forgot to mention one thing in my question. Its like the path will be different everytime. Say, we have systems like development, acceptance, production. So when the user clicks on the link abcd, it should take the path of development system and similarly when the user clicks on the link in acceptance or production, the path will be different. say for example, in development the path will be
    usr/cluster/dev/abcd.properties but it acceptance it will be usr/cluster/acc/abcd.properties. So just want to know whether this will work? Anyway, I will give this a try.
    Thanks once again,
    Sai

Maybe you are looking for