You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ken Bowen <kb...@als.com> on 2009/05/22 03:38:35 UTC
SSI configuration
Hi all,
I need to turn on SSI to host a simple html site which uses it.
I shut down TC.
In ~conf/web.xml, I uncommented both the servlet and servlet-mapping
XML for ssi. However, when I restarted TC, I get the following
Exception for every application present in webapps (this one is for
docs):
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
at
org
.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:
1145)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:
992)
at
org
.apache
.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:
4371)
at
org
.apache
.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:
771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:
525)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:
926)
at
org
.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:
889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:
492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:
311)
at
org
.apache
.catalina
.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:
1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:
710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
How do I remedy this?
TIA,
Ken
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: SSI configuration
Posted by raghu ram srinivas <ra...@gmail.com>.
If I tried in this way I am getting the same exception saying that
java.lang.SecurityException: Servlet of class
org.apache.catalina.ssi.SSIServlet is privileged and cannot be loaded by
this web application.
I inserted this contect in seperate file..ie., under my web app. I created
an .xml file adn inserted
<Context docBase="MyWebApp" path="/MyWebApp" reloadable="true"
crossContext="true" privilieged="true">
</Context>
Still not working.....
Can anyone give idea regarding this?
On Fri, May 22, 2009 at 6:54 AM, Ken Bowen <kb...@als.com> wrote:
> 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:kbowen@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-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
--
Raghuram Srinivas
Re: SSI configuration
Posted by Ken Bowen <kb...@als.com>.
Duh! Thanks. I think I need to go away for a long something or other.
Have a good MemDay weekend.
Ken
On May 22, 2009, at 9:53 AM, Caldarale, Charles R wrote:
>> From: Ken Bowen [mailto:kbowen@als.com]
>> Subject: Re: SSI configuration
>>
>> <welcome-file-list>
>> <welcome-file>index.jsp</welcome-file>
>> </welcome-file-list>
>
> The above is unnecessary on Tomcat, since index.jsp is declared as a
> welcome file in the global conf/web.xml. However, you may well want
> to specify index.shtml as an additional welcome file.
>
>> <servlet-mapping>
>> <servlet-name>ssi</servlet-name>
>> <url-pattern>*.shtml</url-pattern>
>> </servlet-mapping>
>
> Note the mapping; the SSI servlet is called *only* for references to
> resources that end in .shtml.
>
>> In index.html
>
> That needs to be index.shtml, otherwise the SSI servlet doesn't get
> involved.
>
> - 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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: SSI configuration
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ken Bowen [mailto:kbowen@als.com]
> Subject: Re: SSI configuration
>
> <welcome-file-list>
> <welcome-file>index.jsp</welcome-file>
> </welcome-file-list>
The above is unnecessary on Tomcat, since index.jsp is declared as a welcome file in the global conf/web.xml. However, you may well want to specify index.shtml as an additional welcome file.
> <servlet-mapping>
> <servlet-name>ssi</servlet-name>
> <url-pattern>*.shtml</url-pattern>
> </servlet-mapping>
Note the mapping; the SSI servlet is called *only* for references to resources that end in .shtml.
> In index.html
That needs to be index.shtml, otherwise the SSI servlet doesn't get involved.
- 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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: SSI configuration
Posted by Ken Bowen <kb...@als.com>.
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:kbowen@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-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: SSI configuration
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ken Bowen [mailto:kbowen@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: SSI configuration
Posted by raghu ram srinivas <ra...@gmail.com>.
I am getting the same error.............any suggestion please.
On Thu, May 21, 2009 at 9:38 PM, Ken Bowen <kb...@als.com> wrote:
> Hi all,
>
> I need to turn on SSI to host a simple html site which uses it.
> I shut down TC.
> In ~conf/web.xml, I uncommented both the servlet and servlet-mapping XML
> for ssi. However, when I restarted TC, I get the following Exception for
> every application present in webapps (this one is for docs):
>
> 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
> at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1145)
> at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
> at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> at
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
> at
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
> at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
> at
> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
> at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
> at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:516)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
>
> How do I remedy this?
> TIA,
> Ken
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
--
Raghuram Srinivas