Questions tagged [web-fragment]

Web fragments, a new feature of Servlet 3.0 technology, solves this problem by modularizing deployment descriptors.

Web fragments, a new feature of Servlet 3.0 technology, solves this problem by modularizing deployment descriptors. A web fragment can be considered a logical segment of a web.xml file. There can be multiple web fragments, each representing a logical segment, and the set of web fragments can be viewed as constituting an entire web.xml file.

Docs: http://www.oracle.com/technetwork/articles/javaee/javaee6overview-part2-136353.html#webfrags

36 questions
4
votes
1 answer

Jetty 8: can a web fragment jar's /META-INF/resources/WEB-INF/classes directory contribute to the web app's classpath?

I created a Servlet 3.0 web fragment jar that contains a file: /META-INF/resources/WEB-INF/classes/com/foo/whatever/i18n.properties One of the Servlet Context Listeners enabled by the web fragment at app startup executes the following code: public…
Les Hazlewood
  • 18,480
  • 13
  • 68
  • 76
3
votes
0 answers

Servlet filter is not initialized, url-mapping not working in web-fragments?

I have an .ear with a war webapplication which is composed of n web-fragment jars. I somehow can't get my servlet filters to call doFilter or even the init methods when mapping the filter with an url-pattern. I am using a shiro-filter which is…
Manuel Waltschek
  • 515
  • 1
  • 6
  • 23
3
votes
2 answers

Define context param from web.xml and web-fragment.xml separately

I have a main webapp project that uses multiple web-fragments. It runs on Tomcat 8. Here in my web.xml file, I have a reference to main Spring context like: contextConfigLocation
hydradon
  • 1,316
  • 1
  • 21
  • 52
2
votes
0 answers

Spring Web Mvc with fragments

Is there any way to configure the Spring MVC dispatcher servlet in web-fragment.xml file, putting all its listeners and servlet mappings in same fragment.xml file and putting the dispatcher-servlet.xml under that fragment project itself;like under…
Karan
  • 21
  • 1
2
votes
0 answers

Embedded tomcat doesn't scan web-fragments

My embedded tomcat class recognizes the web.xml and ServletContainerInitializers, but it doesn't recognize the web-fragments. Very simple code. What flag/config should be turned on for web-fragments to initialized? public static void main(…
Nambi
  • 2,688
  • 8
  • 28
  • 37
2
votes
0 answers

Spring web fragments and java config

I created a simple spring-mvc web app (one controller), and simple spring jar (containing one controller). I utilized servlet 3 spec using web fragments, what I came across was that, if I was using spring xml configuration (as per the example…
user1555190
  • 2,803
  • 8
  • 47
  • 80
2
votes
1 answer

FacesServlet not working in web fragment

I have two web applications (web-module1.war & web-module2.war) and I want to use a web fragment (web-core.jar) for common servlet declaration like FacesServlet. When I declare FacesServlet in web.xml no problem, but when I move this declaration to…
Mohamed Ramrami
  • 12,026
  • 4
  • 33
  • 49
1
vote
0 answers

How to create a modular JSF 3.0 application?

This is the jakarta 9 and jsf 3 version of this classic topic from several years ago: How to create a modular JSF 2.0 application? The context is that I'm migrating a web app to tomcat 10.0.x, jakarta 9, jsf3, spring 6, etc as already detailed…
iljkr
  • 161
  • 1
  • 1
  • 8
1
vote
1 answer

How to manage JAR dependencies from the consuming application

I have created two JAR files. The first contains the core logic to a scheduling service. The second is a Web Fragment Project that contains an optional JSF presentation layer for the former. Each contains its own dependencies in their respective LIB…
vhdz04
  • 159
  • 2
  • 17
1
vote
1 answer

How do I start of creation a web application fragment?

I have been working on a Maven project when I created a screen to display some data. I have finished the required web pages however I was asked to put the webpages into an application fragment. I have completed inside a web application but I am…
1
vote
1 answer

Error deploing web application using two web fragments

Im trying to use two web-fragments in my web aplication and in deploy time i got the follow error: INFO: Starting Servlet Engine: Apache Tomcat/8.0.21 mai 02, 2017 9:02:43 PM org.apache.tomcat.util.descriptor.web.WebXml merge SEVERE: The display…
1
vote
1 answer

Web fragments with maven

I've just discovered web fragments and I'd like to use them in my pluggable application. Basically I'm building a plugin which will contain the security part of my app (based on Spring security). The web fragment contains only the servlet…
Aurasphere
  • 3,841
  • 12
  • 44
  • 71
1
vote
1 answer

Embedded jetty fails to discover web-fragment.xml in maven assembly

My application runs fine on embedded Jetty 9.2.11, but after assembling with the maven assembly plugin, only servlets declared in web.xml are served. My jar contains WEB-INF/web.xml using Servlet 3.0 format A number of jars are placed in…
1
vote
1 answer

Apache Tiles + Spring MVC serves jsps inside jar files

Purpose Design an "add-on" to a web project. Web Project I have a project packaged as WAR which uses Spring MVC 4.1.6 and Apache Tiles 3.0.5 as the UI framework. This a sample of the application-context:
allancth
  • 300
  • 3
  • 15
1
vote
0 answers

Eclipse doesn't resolve/autocomplete taglib of web fragment project

I've got a problem with eclipse (Kepler) from my Web Fragment project. My taglib work well when I deactivate workspace resolution or when my component define into the "master" project. My web fragment look like this: `-- ComponentFragment `-…
1
2 3