I have java webapp under Tomcat with such sample context:
<Context path="reports" docBase="E:\generatedReports"></Context>
On unix attribute docBase different:
<Context path="reports" docBase="/usr/generatedReports"></Context>
Can I have ONE context.xml (for crossplatform and keeping simple build scripts)?
Value of docBase attribute must be parameter managed in other place?
Technically Yes, you can keep one file and parametrize it when building.
The problem with doing this via build scripts is that
context.xmlsits outside thewebappsand is part of theconf, i.e. the Tomcat installation directory.You ideally want minimum interference with files in the
conffolder and so rather than having it as part of the build and released artifacts, I would suggest you version control it ascontext.xml.windowsandcontext.xml.unixor something similar.And yourself or your admin should manually change/edit these files ensuring all changes are justified.