This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

any sample for "web.xml fragments"? can't find it in formtags-1.1.0.RELEASE.zip.
"web.xml fragments" is a osgi fragments, isn't it?, if so maven-bundle-plugin(http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html) need some update to response on the web module format change.

Comment

No, web.xml fragment support has nothing to do with OSGi fragments (which is indeed confusing).
This means that the web settings configured through the custom manifest headers of a web bundle will be merged with an existing WEB-INF/web.xml file. This is very useful, it means you don't have to transform your entire web.xml to manifest headers (some of those headers are even deprecated now), but you only use your manifest to configure the things that make it easier to set up the Spring-MVC configuration. All the other configuration stays in web.xml, where it belongs.
The samples don't showcase this, since they don't require any web.xml configuration other than what's needed to configure Spring MVC,
It's documented here:
http://static.springsource.com/projects/applicationplatform/1.0.x/programmer-guide/html/ch05s02.html#developing-applications-packaging-web-xml-fragments

Joris

Comment

i guess this document has the following assumption:
1. the /WEB-INF/web.xml will be put in the /MODULE/WEB-INF/web.xml according to the revised web module format.
2. /WEB-INF/web.xml is not packaged in an osgi fragment bundle, instead, it's packaged in the same bundle as the web module bundle.

correct me if i am wrong.

wangqi

Comment

Btw (info for SpringSource developers): The headers of the two documents http://static.springsource.com/projects/s2ap/1.0.x/user-guide/htmlsingle/user-guide.html and http://static.springsource.com/projects/s2ap/1.0.x/programmer-guide/htmlsingle/programmer-guide.html still state it's beta8 based - can you update this?

> i guess this document has the following assumption:
> 1. the /WEB-INF/web.xml will be put in the /MODULE/WEB-INF/web.xml
> according to the revised web module format.
> 2. /WEB-INF/web.xml is not packaged in an osgi fragment bundle, instead,
> it's packaged in the same bundle as the web module bundle.

Yes, that is correct. In addition, I have updated the documentation for web.xml fragments to reflect the new web module structure (i.e., the introduction of the MODULE-INF directory). The updated documentation is now available online here: