reading and updating a file inside WAR file


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: reading and updating a file inside WAR file

  1. #1
    Join Date
    Nov 2003
    Posts
    8

    reading and updating a file inside WAR file

    Hi,

    I want to read a file which is inside a WAR file. Say the file is a properties file. I want to read it and have to do some modification and after doing those modification i need to place the file again inside the war file. Can u suggest someone the way to do it?

    -Jim
    Viren

  2. #2
    Join Date
    May 2004
    Posts
    7
    I'm pretty sure that war files are the same as jar file. You can probably use the jar utility to do all your extracting and adding stuff.

  3. #3
    Join Date
    Nov 2003
    Posts
    8
    Hi John,

    Yes war is again a zip of all resources. but i need to read with in from the war file. I need to read a file with in a WAR file without extracting and after updating that one i need to put that again in the WAR file. I know i can extract it ...do the modification and again compress all...but there must be someother way too.
    Viren

  4. #4
    Join Date
    Feb 2004
    Posts
    808
    nope.. believe it or not.. the AR in wAR, means ARchive.. archived things arent changed. Long term persistence for WAR applications is the same as any other app.. writing to file or database.. if necessary you can re-pack the file in the war but what youre asking at the moment is akin to a Windows program using random-access to write bytes to its own exe as a method of storing settings, while it is running. this behaviour is only found in morphing viruses, as an aid to escape detection. other windows programs store info in the registry, or ini files etc..
    The 6th edict:
    "A thing of reference thing can hold either a null thing or a thing to any thing whose thing is assignment compatible with the thing of the thing" - ArchAngel, www.dictionary.com et al.
    JAR tutorial GridBag tutorial Inherited Shapes Inheritance? String.split(); FTP?

  5. #5
    Join Date
    Nov 2003
    Posts
    8
    Hi Cjar

    Thanx a lot for the information u gave.

    Regards
    -Viren
    Viren

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center