tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Ivanov <andrei.iva...@gmail.com>
Subject Re: env-entry with mapped-name
Date Mon, 16 Nov 2015 10:23:52 GMT
Anybody? :-/

On Thu, Nov 12, 2015 at 1:10 PM, Andrei Ivanov <andrei.ivanov@gmail.com>
wrote:

> 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