tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Toal <brian.t...@gmail.com>
Subject Embedded tomcat does not find web-fragment in jars outside web-inf\lib continued...
Date Wed, 04 Oct 2017 07:53:27 GMT
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?


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message