Author: markt Date: Wed May 2 14:52:06 2018 New Revision: 1830764 URL: http://svn.apache.org/viewvc?rev=1830764&view=rev Log: Treat the <mapped-name> element of a <env-entry> in web.xml in the same way as the mappedName element of the equivalent @Resource annotation. Both now attempt to set the mappedName property of the resource.
Modified: tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java?rev=1830764&r1=1830763&r2=1830764&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/WebAnnotationSet.java Wed May 2 14:52:06 2018 @@ -329,13 +329,13 @@ public class WebAnnotationSet { type.equals("java.lang.Long") || type.equals("java.lang.Float")) { - // env-ref element + // env-entry element ContextEnvironment resource = new ContextEnvironment(); resource.setName(name); resource.setType(type); resource.setDescription(annotation.description()); - resource.setValue(annotation.mappedName()); + resource.setProperty("mappedName", annotation.mappedName()); resource.setLookupName(annotation.lookup()); context.getNamingResources().addEnvironment(resource); Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1830764&r1=1830763&r2=1830764&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed May 2 14:52:06 2018 @@ -45,6 +45,17 @@ issues do not "pop up" wrt. others). --> <section name="Tomcat 9.0.9 (markt)" rtext="in development"> + <subsection name="Catalina"> + <changelog> + <fix> + Treat the <code><mapped-name></code> element of a + <code><env-entry></code> in web.xml in the same way as the + <code>mappedName</code> element of the equivalent <code>@Resource</code> + annotation. Both now attempt to set the <code>mappedName</code> property + of the resource. (markt) + </fix> + </changelog> + </subsection> <subsection name="Coyote"> <changelog> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org