ÎÒÃÇÖªµÀ£¬ÐèÒªÔËÐÐshtml£¬±ØÐëÔÚweb·þÎñÆ÷ÉÏÅäÖúÃssi¡£
ÏÂÃæÊÇssiÔÚtomcat5.*ÉϵÄÅäÖ÷½·¨£º
´ò¿ªtomcatÅäÖÃÎļþ£ºconf/web.xml£º
1¡¢È¥µôÏÂÃæservletÇ°µÄ×¢ÊÍ
/* <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>
<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>
2¡¢È¥µôservletÓ³ÉäµÄ×¢ÊÍ
/*<servlet-mapping>
<servlet-name>ssi</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>
*/
¸Ä³É
<servlet-mapping>
<servlet-name>ssi</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>
3¡¢ÔÚserver\libĿ¼ÖÐÕÒµ½servlets-ssi.renametojarÎļþ£¬¸Ä³É servlets-ssi.jar
4¡¢ÖØÆôtomcat
5¡¢Ð½¨Ò»¸öshtmlÎļþ²âÊÔÒ»ÏÂ
<HTML>
<HEAD>
<TITLE>shtml²âÊÔ</TITLE>
</HEAD>
<BODY>
<!¨C#echo var=¡±DATE_LOCAL¡± ¨C>
<!¨C#include virtual=¡±hello.jsp¡±¨C>
</BODY>
</HTML>
Ö´ÐÐok£¡£¡£¡