1

I have the below filter in web.xml:

<filter>
    <filter-name>test</filter-name>
    <filter-class>org.test.MyFilter</filter-class>
    <init-param>
        <param-name>loginUrl</param-name>
        <param-value>https://loginAppName</param-value>
    </init-param>
</filter>

Here loginUrl is different in different environments. So I want to externalize this param value. How to do this?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Ani
  • 722
  • 9
  • 27
  • Not possible with stock Java EE. The answer depends on build system used and targeted server(s). Which are you using/targeting? E.g. Maven build system and WildFly server support it. – BalusC Aug 25 '16 at 07:18
  • I moved the properties to catalina.properties file and it's working now. Thanks for the information. – Ani Aug 25 '16 at 14:40

0 Answers0