• Post Reply Bookmark Topic Watch Topic
  • New Topic

Update war file without clobbering web.xml  RSS feed

 
Heathcliff Della-Franca
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I would like to be able to post an updated .war file on the internet for customers to download and save to their webapps directory. The problem with this is that the web.xml on their system contains things like database details etc. In other words, how can I update their code without clobbering the application parameters in their web.xml? I must be missing something because surely this must be something loads of people are doing somehow?
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The trick is to move the configurations out of the web.xml.
There are lots of possibilities: a properties file outside the application, JNDI, HTTP to a separate "config" application in the same VM, etc. etc.
Which approach is best for you depends on how your clients prefer to configure the application.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!