我在Tomcat /web.xml中添加了以下代码
<filter>
<filter-name>ExpiresFilter</filter-name>
<filter-class>org.apache.catalina.filters.ExpiresFilter</filter-class>
<init-param>
<param-name>ExpiresByType image</param-name>
<param-value>access plus 2 weeks</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType text/css</param-name>
<param-value>access plus 2 weeks</param-value>
</init-param>
<init-param>
<param-name>ExpiresByType application/javascript</param-name>
<param-value>access plus 2 weeks</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ExpiresFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
以下代码添加在Tomcat /context.xml
中<context cachingallowed="true" crosscontext="true" debug="5"
path="/jasperserver-pro" reloadable="false">
<valve classname="org.apache.catalina.authenticator.BasicAuthenticator"
disableproxycaching="false" securepageswithpragma="true">
</valve>
</context>
此代码适用于本地但在具有Https / SSL的WEB SERVER上。 有朋友可以帮帮我吗?
提前感谢您的回复。