About Question enthuware.jwpv6.2.637 :

Moderator: admin

Post Reply
renatumb
Posts: 47
Joined: Mon Apr 08, 2013 7:55 pm
Contact:

About Question enthuware.jwpv6.2.637 :

Post by renatumb »

If metadata-complete="true" were declared in web.xml, wouldnt the web-fragment be merged into web.xml ?

How about declare metadata-complete="true" in web-fragment.xml ? Only the annotations wouldnt me processed?

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.jwpv6.2.637 :

Post by admin »

If web.xml has metadata-complete=true, then web fragments will not be included.
As per Section 15.5:
If metadata-
complete is set to " true ", the deployment tool only examines the web.xml file and
must ignore annotations such as @WebServlet , @WebFilter , and @WebListener
present in the class files of the application, and must also ignore any web-
fragment.xml descriptor packaged in a jar file in WEB-INF/lib .
and
The web-fragment.xml also contains the metadata-complete attribute on the web-
fragment element. The attribute defines whether the web-fragment.xml descriptor
is complete for the given fragment, or whether it should scan for annotations in the
classes in the associated jar file. If metadata-complete is set to “ true ” the
deployment tool only examines the web-fragment.xml and must ignore annotations
such as @WebServlet , @WebFilter and @WebListener present in the class files of the
fragment.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests