tomcat开启与配置ssi(支持动态引入html)

1、打开apache-tomcat-6.0.29\conf\web.xml 配置文件

2、去掉文件298行左右关于ssi配置的注释,具体去掉注释的代码如下:


    ssi
    
      org.apache.catalina.ssi.SSIServlet
    
    
      buffered
      1
    
    
      debug
      0
    
    
      expires
      666
    
    
      isVirtualWebappRelative
      0
    
    
      inputEncoding
      utf-8
    
    
      outputEncoding
      utf-8
    
    4

其中以下代码为可选项,可以在以上模块中不加入:


                                                                                                                                                                                                                                                                                                  
        inputEncoding                                                                                                                                                                                                                                                                                          
        utf-8                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                                                  
        outputEncoding                                                                                                                                                                                                                                                                                          
        utf-8                                                                                                                                                                                                                                                                                          
                   

3、去掉文件405行左右关于ssi配置的注释,具体去掉注释的代码如下:


    ssi
    *.shtml

4、加上(支持html引入)

    
        ssi
        *.html
    

4、关于web.xml475行左右的filter不用开启

修改context.xml文件

1、打开apache-tomcat-6.0.29\conf\context.xml配置文件
2、在文件19行Context节点中加入privileged=”true” 加入完之后的配置如下:


    
    WEB-INF/web.xml
    
    
    
    


你可能感兴趣的:(tomcat)