1

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?

1 Answer 1

1

Technically Yes, you can keep one file and parametrize it when building.

The problem with doing this via build scripts is that context.xml sits outside the webapps and is part of the conf, i.e. the Tomcat installation directory.

You ideally want minimum interference with files in the conf folder and so rather than having it as part of the build and released artifacts, I would suggest you version control it as context.xml.windows and context.xml.unix or something similar.

And yourself or your admin should manually change/edit these files ensuring all changes are justified.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.