A text may contain ${...} placeholders, to be resolved as servlet context
init parameters or system properties: e.g. ${user.dir}. Default values can
be supplied using the ":" separator between key and value.
SystemPropertyUtils, ServletContext#getInitParameter(String)
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final PropertyPlaceholderHelper | |
| private static final PropertyPlaceholderHelper |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the resolved Stringthe String to resolve text, ServletContext the servletContext to use for lookups. servletContext)Resolve ${...} placeholders in the given text, replacing them with corresponding servlet context init parameter or system property values. |
| public static String | Returns: the resolved Stringthe String to resolve text, ServletContext the servletContext to use for lookups. servletContext, boolean flag to determine is unresolved placeholders are ignored ignoreUnresolvablePlaceholders)Resolve ${...} placeholders in the given text, replacing them with corresponding servlet context init parameter or system property values. |
| nonStrictHelper | back to summary |
|---|---|
| private static final PropertyPlaceholderHelper nonStrictHelper | |
| strictHelper | back to summary |
|---|---|
| private static final PropertyPlaceholderHelper strictHelper | |
| ServletContextPropertyUtils | back to summary |
|---|---|
| public ServletContextPropertyUtils() | |
| resolvePlaceholders | back to summary |
|---|---|
| public static String resolvePlaceholders(String text, ServletContext servletContext) Resolve ${...} placeholders in the given text, replacing them with corresponding servlet context init parameter or system property values.
| |
| resolvePlaceholders | back to summary |
|---|---|
| public static String resolvePlaceholders(String text, ServletContext servletContext, boolean ignoreUnresolvablePlaceholders) Resolve ${...} placeholders in the given text, replacing them with corresponding servlet context init parameter or system property values. Unresolvable placeholders with no default value are ignored and passed through unchanged if the flag is set to true.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final ServletContext | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | resolvePlaceholder(String
the name of the placeholder to resolve placeholderName)Implements org. Resolve the supplied placeholder name to the replacement value. |
| servletContext | back to summary |
|---|---|
| private final ServletContext servletContext | |
| text | back to summary |
|---|---|
| private final String text | |
| ServletContextPlaceholderResolver | back to summary |
|---|---|
| public ServletContextPlaceholderResolver(String text, ServletContext servletContext) | |
| resolvePlaceholder | back to summary |
|---|---|
| public String resolvePlaceholder(String placeholderName) Implements org. Doc from org. Resolve the supplied placeholder name to the replacement value. | |