Container Module

The Container Module complements the Environment Module and provides an abstraction of a Container: request, response or session. The purpose is to allow using XWiki libraries that require a Container to be executed transparently in environments such as a Servlet or a Portlet environment.

The source code is available on GitHub.


To access the Container interface, use the below code:

private Container container;

The Container initialization is handled by the XWiki instance environment. For a Servlet Container, the initialization is done by the org.xwiki.container.servlet.XWikiServletContextListener which is registered in the /xwiki/WEB-INF/web.xml file:


Related Pages

Trying to decide between Cloud and On Premise? See the comparison on the XWiki Help Center.

Search this space