I\'m pre-packaging a JSP web-app that relies on some file path settings found within web.xml. These settings are unknown at packaging time, because they reference a path the
Basically, you don't do it that way. The web.xml
should contain default values for things, yes, but you should override them when actually doing the deployment. If you're deploying to Tomcat, you do this by including appropriate entries in the context.xml
that you use for the deployment. For example:
<Context path="/app">
<!-- For things described by webapp parameters -->
<Parameter name="foobar" value="grill" />
<!-- For things described by environment entries -->
<Environment name="Bla/SomeFilePath" type="java.lang.String"
value="/opt/bla" />
</Context>
Other containers will have their own mechanisms for doing this so. You'll have to look up their documentation (or make your request for help more focussed).