0

We will release our product as a WAR file and will deploy it into tomcat.

However there a few different projects using the same WAR file, but some will use cluster and others not.

The WEB-INF/web.xml in WAR file does not have <distributable/> element.

So now every time we need to manually modify WEB-INF/web.xml to add the <distributable/> after deploying the WAR file to a cluster site.

My question is that is there any way to avoid this manual step to modify WEB-INF/web.xml?

Could we define it in tomcat config (so that it is one-shot setup and no need manual step every release)?

Or could we enable <distributable/> in programmatic way?

Any advice is appreciated, thanks.

Randy Huang
  • 328
  • 3
  • 10

1 Answers1

0

When we are using Memcached or Redis as the tomcat session replication manager (refer to https://github.com/magro/memcached-session-manager), the <distributable/> element is not neccessary in WEB-INF/web.xml.

Then we can always release WAR file without that element in web.xml.

Randy Huang
  • 328
  • 3
  • 10