On 08/12/17 18:49, Chris Cheshire wrote: > I have a directory resource set defined in my context.xml to handle images : > > <Resources> > <PreResources className="org.apache.catalina.webresources.DirResourceSet" > base="${catalina.base}/cdn/p/images" > webAppMount="/images" /> > </Resources> > > The /p in there actually represents the context path - a given sandbox > might have the same webapp deployed at different context paths > representing different development branches. Is it possible to use a > replacement parameter similar to catalina.base to replace the context > path the webapp is deployed at?
Yes. You can use ant style property replacement in any XML file that is processed by the digester (server.xml, context.xml, web.xml) See the opening section of http://tomcat.apache.org/tomcat-9.0-doc/config/index.html for details. Mark > > I tried following the source through for DirResourceSet but couldn't > see where even catalina.base is getting replaced. > > (I know ant is a solution and I eventually need it for other things > too, but I have never used it and it's not a learning rabbit-hole I > can go down right now) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org