A Java Web Application (webapp) is a collection of servlets, other Java classes, static resources such as HTML pages, other resources, and meta information that describes the webapp bundled together. You can run a webapp on a servlet container. A Java webapp has a typical structure. It can be packaged as a WAR file. A webapp usually contains already packed portions called libraries or modules as JAR files.

Webapps provided by Magnolia

Magnolia provides the following stand-alone, pre-configured Apache Tomcat server that does not include a webapp:
Artifact

Download


Usage / purpose

magnolia-tomcat-barebone

A preconfigured Tomcat server ready to be used together with any Magnolia webapp.


Magnolia provides the following webapps and bundles.

Artifact


 Download


 With Travel demo


 With EE Standard modules


 With EE Pro modules


 With Apache Tomcat

UsageModule summary1
Cloud edition






magnolia-cloud-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found


(tick)(tick)
The standard Magnolia cloud offer bundles a selection of enterprise-level modules, including connectors enabling you to integrate third-party systems, tools and data sources.See Supported modules in the cloud.

magnolia-cloud-dev-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found


(tick)(tick)


Enterprise level webapp specifically built for testing Magnolia Cloud development work locally.See Supported modules in the cloud .
magnolia-cloud-headless-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found


(tick)(tick)
Bundles a lighter selection of enterprise-level modules enabling you to create content and use it in headless deployment scenarios.See Supported modules in the cloud - Headless cloud bundle modules .
Community edition

magnolia-empty-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found





This is the most basic Magnolia webapp. Use this as a base for custom tailored webapp.Core modules from main and ui, Cache (core and ehcache), Pages, Resources, Publishing, Security and Scheduler.

magnolia-community-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found





Complete Magnolia community edition webapp; no demo project.Same as magnolia-empty-webapp plus:
Cache tools,  Cache Browser, Categorization, Commenting, Contacts, DAM, Form , Google sitemap, Groovy, Mail, Messages, MTE , REST and Site.

magnolia-community-demo-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found

(tick)


Same as magnolia-community-webapp plus the travel demoTravel demo community edition 2
magnolia-community-demo-bundle

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found

(tick)

Tomcat-bundle including magnolia-bundled-webapp and travel demoTravel demo community edition 2

Enterprise Standard edition

magnolia‑enterprise‑standard‑webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found


(tick)

Same as magnolia-community-webapp plus Enterprise Standard modules; no demo

Backup, Content Dependencies, Content Translation Support, Diff, Google Analytics, Marketing Tags, Personalization, Publishing Transactional, Soft Locking and Workflow.

magnolia‑enterprise‑standard‑demo‑webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found

(tick)(tick)

Same as magnolia‑enterprise‑standard‑webapp plus the travel demoTravel demo Enterprise Standard edition 3
Enterprise Pro edition  

magnolia-enterprise-pro-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found


(tick)(tick)
magnolia-enterprise-standard-webapp plus Enterprise Pro module(s); no demo

Backup, Content Dependencies, Content Editor, Content tagging, Content Translation Support, Diff, Google Analytics, Marketing Tags, PersonalizationPublishing Transactional, Soft Locking, Workflow and Multisite.

magnolia-enterprise-pro-demo-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found

(tick)(tick)(tick)
magnolia-enterprise-pro-webapp plus the travel demoTravel demo enterprise pro edition 4
magnolia-enterprise-pro-demo-bundle

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found

(tick)(tick)(tick)
Tomcat bundle with magnolia-enterprise-webapp including travel demoTravel demo Enterprise Pro edition 4
magnolia-enterprise-installer

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found

(tick)(tick)(tick)
Installer for magnolia-enterprise-pro-demo-bundle

magnolia-enterprise-weblogic-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found

(tick)(tick) 5(tick)
Webapp based on magnolia-enterprise-webapp including travel demo; tuned for Weblogic without workflow 5Travel demo Enterprise Pro edition 4

magnolia-enterprise-websphere-webapp

Error rendering macro 'artifact-resource-macro'

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and Java type class info.magnolia.sys.confluence.plugin.artifactinfo.nexus.entities.SearchNGResponse, and MIME media type application/octet-stream was not found

(tick)(tick) 5(tick)
Webapp based on magnolia-enterprise-webapp including travel demo; tuned for Websphere without workflow 5Travel demo Enterprise Pro edition 4

(1) The module summary does not list all modules but provides a good summary. To get the complete list of the modules, look at the corresponding pom file of the bundle.
(2) Travel demo Community edition contains the following modules: magnolia-travel-demo, magnolia-travel-tours.
(3) Travel demo Enterprise Standard edition contains the following modules: magnolia-travel-demo, magnolia-travel-tours, magnolia-travel-demo-personalization, magnolia-travel-demo-marketing-tags.
(4) Travel demo Enterprise Pro edition contains the following modules: magnolia-travel-demo, magnolia-travel-tours, magnolia-travel-demo-personalization, magnolia-travel-demo-marketing-tags, magnolia-travel-demo-multisite.
(5) Both magnolia-enterprise-weblogic-webapp and magnolia-enterprise-websphere-webapp contain all Enterprise Standard and Pro modules but not those for workflow.


Webapp directory structure

The directory structure is the container that holds the components of a webapp. The first step in creating a Magnolia webapp is creating this structure. The following table describes what each directory should contain.

Path

Contents

cache/

Files with cached content.

docroot/

Files extracted from mgnl-files/docroot in the JAR.

logs/

Magnolia log files.

META-INF/

Meta information files, e.g. from Maven.

repositories/

Repository.

templates/

Templates extracted from mgnl-files/templates in the JAR.

tmp/

Temporary work directory.

WEB-INF/

All resources related to the application that are not in the document root. WEB-INF directory is not part of the public document. No files contained in this directory can be served directly to a client.

WEB-INF/bootstrap

Bootstrap files. Empty by default.

WEB-INF/bootstrap/common

Bootstrapped on author and public instances.

WEB-INF/bootstrap/author

Bootstrapped on author instance only.

WEB-INF/bootstrap/public

Bootstrapped on public instance only.

WEB-INF/classes

Class path for manually deployed classes.

WEB-INF/config

Configuration files for repository and properties.

WEB-INF/config/default

Configuration files.

WEB-INF/config/default/magnolia.properties

Properties such as: repository location, persistence manager to be used, should samples be bootstrapped, should installation be done in unattended mode etc.

WEB-INF/config/default/repositories.xml

Defines repository configuration.

WEB-INF/config/default/log4j.xml

Log4j logging configuration.

WEB-INF/config/magnoliaAuthor

Properties used on author instance only.

WEB-INF/config/magnoliaPublic

Properties used on public instance only.

WEB-INF/config/repo-config/typeOfPM.xml

Persistence manager configuration files.

WEB-INF/config/jaas.config

Configuration for authentication and authorization.

WEB-INF/lib

JAR files.

WEB-INF/web.xml

Deployment descriptor. Describes configuration information for the entire web application.

Adding the Magnolia main filter to the webapp

The Magnolia main filter is registered in the web.xml file. The file only defines one filter:

<filter>
    <display-name>Magnolia global filters</display-name>
    <filter-name>magnoliaFilterChain</filter-name>
    <filter-class>info.magnolia.cms.filters.MgnlMainFilter
    </filter-class>
</filter>
<filter-mapping>
    <filter-name>magnoliaFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
    <dispatcher>ERROR</dispatcher>
</filter-mapping>

The Magnolia main filter will delegate the request to the Magnolia filter chain. The filter is also mapped to forward requests, which means that the Magnolia filter chain will be re-executed on internal forwards.

Adding the Magnolia context listener

In web.xml we also register one listener:

<listener>
    <listener-class>
    info.magnolia.cms.servlets.MagnoliaServletContextListener
    </listener-class>
</listener>

The listener initializes the system, starts the repository and modules, while the filter handles all requests.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))