Ah silly of me; I did read it, but completely spaced over:

"Only Contexts which are marked as privileged may use SSI features (see the privileged property of the Context element)."

But it doesn't seem to mention what you say about the global vs local contexts:

You must mark your webapp that wishes to use SSI as privileged in its <Context> element. Unless you want to mark all of your webapps as privileged, do not uncomment the SSI servlet in the global conf/ web.xml; instead, place the SSI servlet definition and mappings to the WEB-INF/web.xml of the webapps that need to use SSI.

I think that ought to be inserted verbatim at the end of "Installation".

However, I still seem to be missing the joke, because things aren't working. So first here's my setup: java version "1.5.0_16"; tomcat 6.0.18 (from apache) on Mac OS X 10.5.6
I created a very simple stripped-down app as follows:

META-INF/context.xml:

<Context debug="5" reloadable="true" crossContext="true" privileged="true">
</Context>

WEB-INF/web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
        xmlns="http://java.sun.com/xml/ns/j2ee";
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
        http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

  <servlet>
        <servlet-name>ssi</servlet-name>
        <servlet-class>
          org.apache.catalina.ssi.SSIServlet
        </servlet-class>
        <init-param>
          <param-name>buffered</param-name>
          <param-value>1</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>0</param-value>
        </init-param>
        <init-param>
          <param-name>expires</param-name>
          <param-value>666</param-value>
        </init-param>
        <init-param>
          <param-name>isVirtualWebappRelative</param-name>
          <param-value>0</param-value>
        </init-param>
        <load-on-startup>4</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>ssi</servlet-name>
        <url-pattern>*.shtml</url-pattern>
    </servlet-mapping>
</web-app>

In index.html (taken from http://httpd.apache.org/docs/1.3/howto/ssi.html) :

<p>Today is |<!--#echo var="DATE_LOCAL" -->|<p>

No errors in the logs (catalina.out); for completeness, I've attached that at the very end.

But the output is:

Today is ||

So I've missed something.
Thanks,
Ken

catalina.out:

$ ../bin/startup.sh ; tail -f catalina.out
Using CATALINA_BASE:   /opt/apache-tomcat-6.0.18
Using CATALINA_HOME:   /opt/apache-tomcat-6.0.18
Using CATALINA_TMPDIR: /opt/apache-tomcat-6.0.18/temp
Using JRE_HOME:       /Library/Java/Home
May 22, 2009 6:48:35 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/ Extensions:/usr/lib/java
May 22, 2009 6:48:35 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 22, 2009 6:48:35 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 452 ms
May 22, 2009 6:48:35 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 22, 2009 6:48:35 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
May 22, 2009 6:48:35 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 22, 2009 6:48:35 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 22, 2009 6:48:35 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/19  config=null
May 22, 2009 6:48:35 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 555 ms


On May 21, 2009, at 11:37 PM, Caldarale, Charles R wrote:

From: Ken Bowen [mailto:kbo...@als.com]
Subject: SSI configuration

May 21, 2009 9:31:58 PM org.apache.catalina.startup.HostConfig
deployDirectory
SEVERE: Error deploying web application directory docs
java.lang.SecurityException: Servlet of class
org.apache.catalina.ssi.SSIServlet is privileged and cannot be loaded
by this web application

Read the Tomcat SSI doc:
http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html#Installation

Note especially: "Only Contexts which are marked as privileged may use SSI features (see the privileged property of the Context element)."

You must mark your webapp that wishes to use SSI as privileged in its <Context> element. Unless you want to mark all of your webapps as privileged, do not uncomment the SSI servlet in the global conf/ web.xml; instead, place the SSI servlet definition and mappings to the WEB-INF/web.xml of the webapps that need to use SSI.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to