I need to build a web application on server with different color skins for 2 different enviroments (test/prod), so users can easily at first glance tell, which enviroment, they're using. In web.xml file I specified a valid path to a file
<!ENTITY skin SYSTEM "file:///C:/Users/user123/.app-config/app-name/skin.xml">
which I use
<context-param>
<param-name>defaultSkin</param-name>
<param-value>&skin;</param-value>
</context-param>
but is there any way for me to dynamically fill a part of the path? For example
<!ENTITY skin SYSTEM "file:///C:/Users/user123/.app-config/#{servletContext.contextPath}/skin.xml">
If you're in control of the XML parsing then there will usually be some kind of mechanism like an EntityResolver that you can use. But that doesn't appear to be the case here. My instinct would be to generate two different web.xml files as part of your application build process.