2011-08-18 74 views
0

如何在Tomcat 7上啓用SSI?如何在Ubuntu上的Tomcat 7上啓用SSI(服務器端包含)?

我按照指示,但它不起作用。我改變了從HTML我的主要文件的擴展名的shtml(不導入一個)和不帶引號的,在web.xml中線路:

<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> 

什麼做多,哪裏是哪裏呢?

+0

您是否已將SSL配置添加到Tomcat配置文件? – Chris

+0

@Chris你能解釋一下你的意思嗎? – kamaci

回答

2

您還需要取消對SSI servlet映射在web.xml

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

,創造$ CATALINA_HOME/conf目錄/卡塔利娜/本地主機/ <的程序名稱> .XML

<?xml version="1.0" encoding="UTF-8"?> 
<Context privileged="true" > 
</Context> 
相關問題