On 04/10/17 08:53, Brian Toal wrote:
> The chain [1] left of with:
> "The relevant language is in section 8.2.1
> 
> <quote>
> If a framework wants its META-INF/web-fragment.xml honored in such a way
> that it augments a web application's web.xml, the framework must be bundled
> within the web application's WEB-INF/lib directory
> </quote>
> 
> Therefore, Tomcat 8.0 looks to be doing the right thing."
> 
> Which I think is fine for the case where the container is augmenting a
> existing web.xml.
> 
> However the spec also says "If a framework is packaged as a jar file and
> has metadata information in the form of deployment descriptor then the
> web-fragment.xml descriptor must be in the META-INF/ directory of the jar
> file."
> 
> I'm not interested in augmenting a existing web.xml, nor my embedded app is
> using WEB-INF/lib, which seems not to meet the eligibility critieria for
> adding the jar to WEB-INF/lib , tomcat should honor
> META-INF/web-fragment.xml in jars in the absence of web.xml, to determine
> if the Servlet 3.0 annotations are going to be scanned.  This is the
> problem I'm having after fixing the classloading issues in [2].
> 
> Thoughts?

If you use addContext() the expectation is that you also take on
responsibility for performing all of the configuration.

If you want all the standard Servlet spec behaviour out of the box, you
need to use addWebapp().

If you take the addContext() route then you can make use of the same
code Tomcat uses to perform the configuration. Suggestions on how to
make that more extensible / flexible / etc. welcome.

Mark


> [1] - https://marc.info/?l=tomcat-user&m=149443917508077&w=2
> [2] - https://marc.info/?l=tomcat-user&m=150701409822162&w=2
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to