Section 25 Adding Content to the Tomcat Server

In LISTSERV Maestro, the various parts that are served by Tomcat are called “contexts”. Each context is an entity of its own inside of the Tomcat server. Each context has a name, which is also part of the URL that you use to access the context. More precisely, the context’s name is the part which appears right after the server name. For example, for LUI, the context name is lui, so the URL is http://yourhost/lui. Other LISTSERV Maestro contexts are hub, trk, list, archives, and script, with the respective URLs (http://yourhost/hub, http://yourhost/list, etc).

If you enter a context’s access URL (as above), what you actually get is the default page for that context (usually a page called index.html, index.jsp, default.htm, etc.). Therefore, if you type http://yourhost/lui, then what you actually get is the default page for the lui context (http://yourhost/lui/index.jsp).

To add content of your own (for example HTML pages, images, downloadable files, etc.) to the Tomcat installation of LISTSERV Maestro, you simply create a new context and put your files into that context. The files are then accessible using the URLs in that context.

Out of the box, Maestro does not support content or pages that are not part of a context. However, it is possible to support such content or pages once some additional configuration steps are taken (see Section 25.2 Defining the Default Context for details).

25.1 Adding Content as a New Context

To create a new context, create a folder (with the name of the context) in the webapps folder of LISTSERV Maestro. For example, if you want to create a new context called sample, then you would create the following folder:


Copy the following folder (and the files in it) from the archives context to your newly created context:


(The archives context is automatically installed with each Maestro Tomcat.

After you copy this folder into your new folder, you will have:


You can now put whatever files you want into the sample folder (you can also create subfolders). You may want to include a start page, such as index.html or similar, but you can also have other pages, image files, or other downloadable content if you want (even in subfolders). These files would then be accessed as follows:

http://yourhost/sample                             access to the start page (if one was supplied)

http://yourhost/sample/                          also access to the start page

http://yourhost/sample/page.html      access to page.html

http://yourhost/sample/sub/other.html  access to other.html in the sub subfolder


Restart Maestro to make it aware of the new context.

Important: Do not create custom contexts with one of the reserved names used by LISTSERV Maestro (i.e. do not call your context lui, hub, trk, list, archives, or script).

Do not put any files into the WEB-INF folder, as they would not be accessible via a URL.

Do not create a folder or subfolder called META-INF. This is a reserved name.

25.2 Defining the Default Context

The default context is the context used if the user types the access URL without any context name, such as http://yourhost or http://yourhost/somepage.html.This is not supported out of the box by Maestro; instead, it must be configured.

To define a default context, create a new context (with a new subfolder in “webapps”) as described in the previous section.

In addition, before restarting Maestro, include the following entry in the tomcat.ini:


where you replace CONTEXT_NAME_HERE with the name of your context (for example, DefaultContext=sample, making the sample context the default).

Note: Do not define any of the reserved LISTSERV Maestro contexts as the default context (lui, hub, trk, list, archives, or script)

With this entry in the tomcat.ini, the given default context (“sample” in this case) can now be accessed in two ways:

·         As before, you can still specify the context directly in the URL:

http://yourhost/sample                              access to the start page

http://yourhost/sample/                           also access to the start page

http://yourhost/sample/page.html       access to page.html

http://yourhost/sample/sub/other.html  access to other.html in the sub subfolder

·         In addition, you can leave out the context in the URL but will still see the same pages (but this works only for the default context, of course):

http://yourhost                             access to the start page of the default context

http://yourhost/                           also access to the start page of the default context

http://yourhost/page.html   access to page.html in the root folder of the default context

http://yourhost/sub/other.html  access to other.html in the sub subfolder of the default context