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
scripts, 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).
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:
In the WEB-INF folder that you just copied, edit the
web.xml file and look for the
<param-value>archives</param-value> entry. Change the text “
archives” to the name of your context, i.e. so that you end up with something like this:
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:
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
scripts).
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.
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.
where you replace CONTEXT_NAME_HERE with the name of your context (for example,
DefaultContext=sample, making the sample context the default).
With this entry in the tomcat.ini, the given default context (“
sample” in this case) can now be accessed in two ways:
With enabled access logging, Tomcat will create log files in the same format as those created by standard web servers. These logs can later be analyzed by standard log analysis tools to track page hit counts, user session activity, and so on. The log files are created separately (under different names) for all contexts for which access logging is enabled and are rolled over nightly at midnight. All access log files are created in the following folder:
In this file, add a “<Valve>” tag, just before the closing “
</Context>” tag, so that the resulting “context.xml” file looks similar to this (the part that you are supposed to add is marked with bold):
In this tag, replace “YOURNAME” with a name that uniquely identifies the context for which you are enabling the logging, for example “WA” or “Archives” (this will become part of the log file name). Lastly, restart LISTSERV Maestro.
In this file, either edit the “<Valve>” tag (if one already exists) or add a new one similar to the following (if there is no such tag yet), just before the closing “
</Context>” tag, so that the resulting “context.xml” file looks similar to this (the part that you are supposed to add is marked with bold):