resin服務器支持SSI相關配置

resin服務器支持SSI相關配置 html


web.xml配置: java

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
 xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 
  web

    <servlet>
        <servlet-name>SSIServlet</servlet-name>
        <servlet-class>com.caucho.servlets.ssi.SSIServlet</servlet-class>
    </servlet>
   
   <servlet-mapping>
     <servlet-name>SSIServlet</servlet-name>
     <url-pattern>*.shtml</url-pattern>
  </servlet-mapping> 服務器

 
 
 
 
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app> app

測試: jsp


index.shtml 測試


  <!--#include virtual="/test.inc" --> url


test.inc xml

  test a include file content htm

 執行:index.shtml 則顯示test.inc裏的內容。

相關文章
相關標籤/搜索