How to know when the request is forwarded in a RequestWrapper object
问题 I am using a subclass of HttpServletRequestWrapper to do some translations on the request parameters, and I cache the translated values the first time they are requested. For example, the first time getQueryString() is called, I call super.getQueryString() and calculate the result that I want and keep it in a field, and then return it. Next times, I just use the cached result. This method works like a charm unless there's some "forwarding". When a request is forwarded, Tomcat replaces the