This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: WAR file update through program
 
Similar Threads
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
war file