Colon in the Property Placeholder

java, spring

Solution

First of all there is nothing about `JSTL`.

The expression `${...}` comes from `<property-placeholder/>`.

The `colon` means a delimiter between value from property placeholder and the default value. For example your case:

`application.myVar` the key to resolve value from properties file.

'the empty string after colon' - the default value, if `application.myVar` doesn't exist or is empty.

Problem

In our application we have bean configuration in XML file. In XML file I found this line: ``` <jee:jndi-lookup id="myVar" jndi-name="java:jboss/application/myVar" default-value="${application.myVar:}"/> ``` Value of `${application.myVar:}` is stored in properties file. What does colon after `application.myVar` mean?

Original source