Startseite / Plugin-Entwicklung / Entwicklung und Bereitstellung / Modularchitektur / Einstellungen der Web Application

Web Application Settings

Contents

The file web.xml contains mandatory information about the web application component of the FirstSpirit Module. Additionally, it may contain parameters that will be used during run-time by individual plug-ins provided by the module.

For a module carrying only ContentCreator plug-ins, this file follows a rather basic format; most blocks defined by the XML schema are optional in this case. When the JAR file carrying this web.xml is rolled into ContentCreator's archive, only the <context-param> blocks are retained. Otherwise, the module's web.xml file is present only to adhere to Java servlet standards.

Example: web.xml

Important In the ContentCreator Example module framework, the file web.xml is stored in the directory src/web immediately under the module's root directory. If you wish to move this file, you must also modify the Ant build configuration so that it can be located while assembling the FSM file.
Important Note that this example specifies neither a servlet nor a servlet mapping. The classes provided in the module's JAR file will be rolled into the project-specific ContentCreator application as this application is started or updated via ServerManager; thus, any servlet specifications made here would be impractical.
<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/j2ee"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<name>webclient_examples_jar</name>
<displayname>FirstSpirit WebEdit Examples</displayname>
<description>WebApp to provide all classes.</description>

<context-param>
<param-name>webedit.action.workflow</param-name>
<param-value>$WORKFLOW</param-value>
</context-param>

</web-app>

This file offers a very simple description of the web application component that will be added to the ContentCreator web application during roll-out (as described in the chapter Deploying Modules: Adding Client Plug-Ins to a ContentCreator 5 Web Application).

This code provides a display name (<displayname>) and a short description (<description>) of the web application code.

Additionally, the <context-param> block specifies a parameter tuple consisting of a name (<param-name>) and a value (<param-value>), which can be accessed through the servlet context within this module's Java classes during run-time. In this example, the single <context-param> block defines a parameter named webedit.action.workflow with a value $WORKFLOW - this parameter is used in the ContentCreator Examples module's StartWorkflowWebeditInlineEditItemsPlugin.

Mandatory XML Blocks

Block

Mandatory

Location

Description

<web-app></web-app>

yes

top-level

The top-level container. Defines the version of the deployment descriptor as well as the DTD or XML schema that defines the descriptor format.

<name></name>

yes

within <web-app>

The component's name; will be used in module listings and dependency definitions.

    

Optional XML Blocks

Block

Mandatory

Location

Description

<displayname></displayname>

 

within <web-app>

Provides a human-readable display name for this web application. If no display name is defined, the technical name (<name>) is displayed in all FirstSpirit interfaces.

<description></description>

 

within <web-app>

A short description of this web application's purpose and functionality.

<context-param></context-param>

 

within <web-app>

A parameter that will be available to classes of this web application by accessing the servlet context during its run-time. Requires a name/value tuple (see <param-name> and <param-value> below.

<param-name></param-name>

once in each <context-param> block

within <context-param>

Defines the name of the parameter.

<param-value></param-value>

once in each <context-param> block

within <context-param>

Specifies the parameter's value.

    

© 2005 - 2024 Crownpeak Technology GmbH | Alle Rechte vorbehalten. | FirstSpirit 2024.4 | Datenschutz