filter-library.xtp

来自「解压在c盘」· XTP 代码 · 共 72 行

XTP
72
字号
<s1 title="Filter Library"><s2 title='GzipFilter'><p>The GzipFilter compresses the output of pages for browsers whichunderstand compression.</p><example>&lt;web-app>  &lt;filter-mapping url-pattern='/*'                  filter-name='com.caucho.http.filter.GzipFilter'/>&lt;/web-app></example><deftable><tr><td>use-vary<td>Uses the standard Vary header for Accept-Encoding<td>true<tr><td>no-cache<td>Sets the Cache-Control: no-cache header<td>false</deftable></s2><s2 title='TransactionFilter'><p>The TransactionFilter wraps the request in a UserTransaction andcommits the transaction when the servlet completes.</p><example>&lt;web-app>  &lt;filter-mapping url-pattern='/DatabaseServlet/*'                  filter-name='com.caucho.http.filter.TransactionFilter'/>&lt;/web-app></example></s2><s2 title='ExpiresFilter'><p>The ExpiresFilter sets the Expires cache control header, allowingthe servlet output to be cached for a short time.</p><example title="Caching stock quotes for 60 seconds">&lt;web-app>  &lt;filter-mapping servlet-name='StockQuoteServlet'                  filter-name='com.caucho.http.filter.ExpiresFilter'>    &lt;init-param cache-time="60s"/>  &lt;/filter-mapping>&lt;/web-app></example></s2><s2 title='AnonymousExpiresFilter'><p>The AnonymousExpiresFilter caches output for anonymous, i.e.non-logged in users.  When a page has custom formatting forlogged in users, it may still want to cache the results fornon-logged in users saving time and database access.</p><example title="Caching all anonymouse users *.jsp pages for 15 minutes">&lt;web-app>  &lt;filter-mapping url-pattern='*.jsp'                  filter-name='com.caucho.http.filter.AnonymousExpiresFilter'>    &lt;init-param cache-time="15m"/>  &lt;/filter-mapping>&lt;/web-app></example></s2></s1>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?