https://issues.apache.org/bugzilla/show_bug.cgi?id=53090
Bug #: 53090
Summary: Servlet superclass injection targets are ignored
Product: Tomcat 7
Version: 7.0.26
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 28623
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28623
patch that shows the processing of the servlet's superclass injections
Hi folks,
I've been running Tomcat 7.0.26 in a JEE container against the EE6 Web Profile
CTS.
In many of the tests there is the following scenario: A servlet 'X' extends a
regular class 'Y'. An env-entry element for a field in 'Y' with
injection-target-class equal to 'Y' is defined in the app's web.xml. The
injection-target-name points to a field that is not annotated.
When the app boots and Tomcat handles the injections for the servlet it
processes only those that are defined explicitly for the 'X' servlet's class
name, ignoring its superclasses.
I'm attaching a patch I made on top of 7.0.x/trunk that fixed the issue. It's
quite small.
I believe Tomcat should respect the injections for the servlet's superclasses.
What do you think is the right behavior?
Thank you,
Bobby
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]