[jboss-jira] [JBoss JIRA] (AS7-5835) CLONE - application.xml does not support property replacement

Brad Maxwell (JIRA) jira-events at lists.jboss.org
Wed Oct 24 21:13:01 EDT 2012


    [ https://issues.jboss.org/browse/AS7-5835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729023#comment-12729023 ] 

Brad Maxwell commented on AS7-5835:
-----------------------------------

I tested again, in AS 7.2.0 Alpha 1 and system property substitution is not working for env-entries, it does appear to be working for context-params.

./standalone.sh -DsysProp=test

standalone.xml
----------------------------
        <subsystem xmlns="urn:jboss:domain:ee:1.1">
            <spec-descriptor-property-replacement>true</spec-descriptor-property-replacement>
            <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
        </subsystem>

web.xml:
----------------------------
 <context-param>
  <param-name>webtest</param-name>
  <param-value>${sysProp:'web-test'}</param-value>
 </context-param>
  <env-entry>
    <env-entry-name>test</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>${sysProp:'web-test-env'}</env-entry-value>
  </env-entry>

  <env-entry>
    <env-entry-name>test2</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>test2</env-entry-value>
  </env-entry>

index.jsp:
----------------------------
<body>
  ${initParam['webtest']}<br/><br/>
  <%=new InitialContext().lookup("java:app/env/test") %><br/><br/>

  <%=new InitialContext().lookup("java:comp/env/test") %><br/><br/>

  <%=new InitialContext().lookup("java:comp/env/test2") %><br/>
</body>


Output: 
----------------------------
test

${sysProp:'app-test'}

${sysProp:'web-test-env'}

test2
                
> CLONE - application.xml does not support property replacement
> -------------------------------------------------------------
>
>                 Key: AS7-5835
>                 URL: https://issues.jboss.org/browse/AS7-5835
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EE
>    Affects Versions: 7.1.3.Final (EAP)
>            Reporter: Tom Fonteyne
>            Assignee: Stuart Douglas
>            Priority: Minor
>         Attachments: PropertyTest.ear, PropertyTest.ear
>
>
> Property substitution in application.xml does not work

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list