• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

name conflict in web.xml and web-fragment.xml

Ranch Foreman
Posts: 1904
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to EPractice Lab:

Configuration conflicts between the main web.xml and a web fragment are resolved such that the configuration in the web.xml takes precedence.

But when I try this:

//in web.xml

// in web-fragment.xml in A.jar's META-INF
<web-fragment xmlns="http://xmlns.jcp.org/xml/ns/javaee";


In my main index.jsp :

Which valueB was printed? I got 20 , which comes from the web-fragment.xml.
Himai Minh
Ranch Foreman
Posts: 1904
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I made a mistake in the web.xml. The param value should be "valueB".
Now, it prints 30, which comes from web.xml.
Please ignore this post.
I am going to test your electrical conductivity with this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic