arisalexis
arisalexis

Reputation: 2210

where to put a customised second web.xml

I want to create this simple schema:

I am writing a maven application that gets deployed as a war to the server. I want to have the same web.xml for my localmachine and the server and add individual context params according to the machine.

Right now I do this by putting them in Tomcat's global web.xml but this gets propagated in all applications running (which is working but it's obviously not the right way to do).

Can I add web.xml parameters for a specific webapplication ? some setting in context.xml somewhere?

Upvotes: 1

Views: 52

Answers (1)

watery
watery

Reputation: 5487

As an exercise (I hadn't the chance to use this in production yet) I tried to pack a different (transformed) web.xml in the final WAR based on different profiles.

You can check my own question and its answer here.

Upvotes: 1

Related Questions