📄 pagerequestwrapper.java
字号:
/* This software is published under the terms of the OpenSymphony Software * License version 1.1, of which a copy has been included with this * distribution in the LICENSE.txt file. */package com.opensymphony.module.sitemesh.filter;import javax.servlet.RequestDispatcher;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletRequestWrapper;/** * Will wrap a request for the {@link RequestDispatcherWrapper}. * * @author <a href="mailto:joeo@enigmastation.com">Joseph B. Ottinger</a> * @version $Revision: 1.4 $ */public class PageRequestWrapper extends HttpServletRequestWrapper { private static final boolean SUPPRESS_IF_MODIFIED_HEADER = true; //todo - pull this from a config file public PageRequestWrapper(HttpServletRequest request) { super(request); } public RequestDispatcher getRequestDispatcher(String s) { return new RequestDispatcherWrapper(super.getRequestDispatcher(s)); } public String getHeader(String string) { // suppress 'if-modified-since' header, so that decorators can modify the response. if (SUPPRESS_IF_MODIFIED_HEADER && "IF-MODIFIED-SINCE".equalsIgnoreCase(string)) { return ""; } else { return super.getHeader(string); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -