Meaningless Drivel is fun!*
The moose likes EJB and other Java EE Technologies and the fly likes WAR file update through program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "WAR file update through program" Watch "WAR file update through program" New topic
Author

WAR file update through program

L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi,
Can I update WAR file, by adding or replacing new files into it through J2SE API.? If so which API I need to use?
Cheers.


SCJP, SCWCD
Peter Storch
Ranch Hand

Joined: Jun 12, 2003
Posts: 74
I would use ANTs war task to work with war files programatically. But I don't know if it is able to just update an existing war file.
But it recognises if a war has to be recreated while checking the dependend files.
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
i think setting update flag to "true" when using the war task s'd do the job.
i mean
<war update="true"
....
</war>
u can try it anyways.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Can I update WAR file, by adding or replacing new files into it through J2SE API.? If so which API I need to use?

java.util.jar


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
jQuery in Action, 2nd edition
 
subject: WAR file update through program