File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WAR file update through program
 
Similar Threads
war file
ClassCastException: org.apache.struts.action.ActionServlet cannot be cast to javax.servlet.Servlet
Updating a class file inside a EJB Project or a WAR file inside an EAR
Updating the contents of a war file in production environment.
Registering a Servlet at runtime