Referencing Environment Variables in web.xml

Posted by Udi Bar-On on Stack Overflow See other posts from Stack Overflow or by Udi Bar-On
Published on 2009-09-10T10:00:13Z Indexed on 2010/04/01 4:03 UTC
Read the original article Hit count: 331

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 customer will set when deploying the entire application (of which the web-app is a management interface).

It seems that the easiest way to avoid tokens and file modifications in my installer script, is to ask the user for an install location, set this location as an environment variable (e.g JAVA_HOME), and have web.xml always reference that variable.

Is there a way to reference an environment variable value from within web.xml? Google searches lead to the J2EE method of SETTING environment variables from ejb xml files. This is not what I'm looking for.

Thanks Udi

© Stack Overflow or respective owner

Related posts about web.xml

Related posts about environment-variables