官网上由于使用了<!--#include file="include/header.html"-->标签,在把代码复制到本地的状况下出现网页不能长正常显示的状况,多方查证才发现是由于正常状况下不能正常解释include,由于打开可能会对性能形成影响,下边对其打开分为tomcat和IIS进行分别介绍:html
1.tomcatweb
(1)找到tomcat配置文件位置,找到context.xml与web.xml,并进行备份;apache
(2)打开context.xml文件,在Context父标签中添加属性privileged="true",具体以下:tomcat
<Context privileged="true"> <!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> <!-- Uncomment this to enable Comet connection tacking (provides events on session expiration as well as webapp lifecycle) --> <!-- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> --> </Context>
(3)保存文件;服务器
(4)打开web.xml文件;session
(5)找到Built In Servlet Mappings处,将servlet-mapping处关于html部分解除注释,以下图所示:app
(6)找到servlet配置部分,找到以下图代码部分,解除注释;webapp
(7)保存文件,重启tomcat服务器便可;ide
2.IIS性能
(1)打开IIS;
(2)点击须要设置的网站;
(3)选择“处理应用程序映射“;
(4)点击添加模块映射,填写内容以下图所示;
(5)重启II