Web.xml: setting values โ€‹โ€‹from a properties file

Is it possible to set values โ€‹โ€‹in Tomcat web.xml by extracting values โ€‹โ€‹from a properties file?

eg. I would like the user role settings to be externalized in the properties file, is it possible then to do something like this:

my properties file:

#properties file
my.user.role=role1

my web.xml:

<security-role>
    <role-name>${my.user.role}</role-name>
</security-role>

Edit:

I found this article, so I suppose roles should be set static in web.xml.

+3
source share
1 answer

Access to system environment variables. Also see this post.

0
source

All Articles