Apache Tomcat 4 - SSI How To

| # Apache Tomcat 4 |

Links Docs Home Getting Started Introduction READ ME Install and Run Building from Source Configuration Reference Administrators CGI HOW-TO Class Loader HOW-TO Connectors List HTML Manager App HOW-TO JK Documentation JNDI DataSource HOW-TO JNDI Resources HOW-TO JSP Engine Config HOW-TO Manager App HOW-TO MBean Descriptor HOW-TO Proxy Support HOW-TO Realm HOW-TO Security Mgr. HOW-TO SSI Config HOW-TO SSL Config HOW-TO Application Developers App Developer Guide Servlet/JSP Javadocs Catalina Developers Functional Specs. Javadocs Jasper Developers Javadocs |
# 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). inputEncoding - The encoding to be assumed for SSI resources if one cannot be determined from the resource itself. Default is the default platform encoding. outputEncoding - The encoding to be used for the result of the SSI processing. Default is UTF-8.
Copyright © 1999-2005, Apache Software Foundation