tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Ivanov <andrei.iva...@gmail.com>
Subject env-entry with mapped-name
Date Thu, 12 Nov 2015 11:10:50 GMT
Hi,
After reading https://bitbucket.org/sgarlick/demo/wiki/JNDI, I tried to
apply that to my app deployed on Tomcat:

Tomcat context.xml has this entry:
<Environment name="env/enss/profile" value="dev" type="java.lang.String" />

The application web.xml has this entry:
    <env-entry>
        <env-entry-name>spring.profiles.active</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <mapped-name>java:comp/env/env/enss/profile</mapped-name>
    </env-entry>

>From what I understand, when Spring looks up
java:comp/env/spring.profiles.active Tomcat should find it using the value
provided in the mapped-name.

It doesn't work and by looking at the Tomcat 8.0.28 sources, the
mapped-name is just added in the properties of ContextEnvironment, but it's
never used.

Did I misunderstand what the mapped-name should do?
Or is it a bug in Tomcat that it doesn't use mapped-name for anything?

Thank you

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message