struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (WW-4928) Setting struts.devMode from system property not working as described
Date Thu, 22 Mar 2018 18:28:00 GMT


ASF GitHub Bot commented on WW-4928:

aleksandr-m opened a new pull request #217: WW-4928 Using the same default value delimiter

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Setting struts.devMode from system property not working as described
> --------------------------------------------------------------------
>                 Key: WW-4928
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions:
>         Environment: **Windows, Linux, Solaris
>            Reporter: Peter J Ford
>            Priority: Minor
>              Labels: documentation, easyfix
> According to [] the
struts.devMode setting can be read from environment strings or system properties. This works
correctly when setting from an environment string - for example:
> {{<constant name="struts.devMode" value="${env.STRUTS_DEV_MODE:false}"/>}}
> However it does not work for system properties, such as setting "-DstrutsDevMode=true"
as a system property and this in struts.xml:
> {{<constant name="struts.devMode" value="${strutsDevMode:false}"/>}}
> Having dug through the source I found that this is to do with the way the value substitutor
is configured, and that using ":-" instead of ":" as the separator string when using system
properties will work:
> {{<constant name="struts.devMode" value="${strutsDevMode:-false}"/>}}

This message was sent by Atlassian JIRA

View raw message