user2505078
user2505078

Reputation:

How to update xml file in war file?

I have war which working in production. I need to change the web.xml and again i need to make war file to deploy.Since we are changing xml file, so no need compliation at all..But i don't have source code to create war file again.

if change the xml file which will work again ? if yes how to create war file in command prompt ?

Upvotes: 3

Views: 5980

Answers (1)

Guillaume Darmont
Guillaume Darmont

Reputation: 5018

WARs are just zip files with .waras extension, so you just have to :

  • extract the WAR into some directory
  • replace web.xml in WEB-INF
  • zip the directory content into a file using the same filename than before.

BTW, try to deploy your repackaged WAR into some production-like environment to test if application is running like you want.

Upvotes: 5

Related Questions