Links

- Docs Home

User Guide

- 1) Introduction
- 2) Setup
- 3) First webapp
- 4) Deployer
- 5) Manager
- 6) Realms and AAA
- 7) Security Manager
- 8) JNDI Resources
- 9) JDBC DataSources
- 10) Classloading
- 11) JSPs
- 12) SSL
- 13) SSI
- 14) CGI
- 15) Proxy Support
- 16) MBean Descriptor
- 17) Default Servlet
- 18) Clustering
- 19) Load Balancer

Reference

- Release Notes
- Tomcat Configuration
- JK Documentation
- Servlet API Javadocs
- JSP API Javadocs

Tomcat Development

- Building
- Changelog
- Status
- Developers
- Functional Specs.
- Tomcat Javadocs
- Jasper Javadocs
- Architecture

# The Tomcat 5 Servlet/JSP Container

## SSI How To

print-friendly
version

Introduction

> SSI (Server Side Includes) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served. They let you add dynamically generated content to an existing HTML page, without having to serve the entire page via a CGI program, or other dynamic technology.

> Within Tomcat SSI support can be added when using Tomcat as your HTTP server and you require SSI support. Typically this is done during development when you don't want to run a web server like Apache.

> Tomcat SSI support implements the same SSI directives as Apache. See the Apache Introduction to SSI for information on using SSI directives.

> SSI support is implemented using the servlet class `org.apache.catalina.ssi.SSIServlet`. Traditionally, this servlet is mapped to the URL pattern "*.shtml".

> By default SSI support is disabled in Tomcat.

Installation

> CAUTION - SSI directives can be used to execute programs external to the Tomcat JVM. If you are using the Java SecurityManager this will bypass your security policy configuration in `catalina.policy.`

> Rename `$CATALINA_BASE/server/lib/servlets-ssi.renametojar` to `$CATALINA_BASE/server/lib/servlets-ssi.jar`.

> Remove the XML comments from around the SSI servlet and servlet-mapping configuration in `$CATALINA_BASE/conf/web.xml`.

Configuration

> There are several servlet init parameters which can be used to configure the behaviour of the SSI servlet.

> - buffered - Should output from this servlet be buffered? (0=false, 1=true) Default 0 (false).
> - debug - Debugging detail level for messages logged by this servlet. Default 0.
> - expires - The number of seconds before a page with SSI directives will expire. Default behaviour is for all SSI directives to be evaluated for every request.
> - isVirtualWebappRelative - Should "virtual" SSI directive paths be interpreted as relative to the context root, instead of the server root? (0=false, 1=true) Default 0 (false).

Copyright © 1999-2003, Apache Software Foundation