On 01.10.2015 00:21, Greg Wilkins wrote:
> Forwarding this response from janb_at_webtide.com:
>
> It is an excellent idea to clarify the text, as I often find users are
> confused about when and why scanning would take place.
>
> During the discussion in the jar for Servlet 3.0, we evolved the
> distinction between "introspected" and "discovered" anntotations and I
> think this distinction is helpful to understanding what is going on.
>
> Suggested text for Section 8.1:
>
> Annotations can be categorized as "discovered" or "introspected".
> Discovered annotations are: @WebServlet, @WebFilter and @WebListener and
> the web container must scan class files to find them. Other annotations
> covered by this specification as detailed in section 15.5 and including
> @HandlesTypes are introspectable, meaning that the web container may find
> them by introspecting the annotated class.
>
> In a web application, classes using discovered and introspected annotations
> will have their annotations processed only if they are located in the
> WEB-INF/classes directory, or if they are packaged in a jar file located in
> WEB-INF/lib within the application.
What about the lib/ directory in .ear files for people who build skinny
WARs?
Cheers
Philippe