/** * Sets the request object for the wrapper. * * @param request the wrapped request */ public void setRequest(ServletRequest request) { super.setRequest(request); this.request = (HttpServletRequest) request; } /**
@Override public void setRequest(ServletRequest request) { synchronized(lock) { super.setRequest(request); } }
public ServletRequestWrapper(ServletRequest request) { setRequest(request); }
public void setRequest(javax.servlet.ServletRequest request) { if (request instanceof HttpServletRequest) { super.setRequest(request); this.httpRequest = (HttpServletRequest) request; } else throw new IllegalArgumentException("Not an HttpServletRequest"); }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = (String) names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = (String) names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = (String) names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Set the request that we are wrapping. * * @param request The new wrapped request */ @Override public void setRequest(ServletRequest request) { super.setRequest(request); // Initialize the attributes for this request synchronized (attributes) { attributes.clear(); Enumeration<String> names = request.getAttributeNames(); while (names.hasMoreElements()) { String name = names.nextElement(); Object value = request.getAttribute(name); attributes.put(name, value); } } }
/** * Unwrap the request if we have wrapped it. */ private void unwrapRequest( State state ) { if( state.wrapRequest == null ) return; ServletRequest previous = null; ServletRequest current = state.outerRequest; while( current != null ) { // If we run into the container request we are done if( current instanceof HttpServletRequestImpl ) break; // Remove the current request if it is our wrapper if( current == state.wrapRequest ) { ServletRequest next = ( (ServletRequestWrapper)current ).getRequest(); if( previous == null ) state.outerRequest = next; else ( (ServletRequestWrapper)previous ).setRequest( next ); break; } // Advance to the next request in the chain previous = current; current = ( (ServletRequestWrapper)current ).getRequest(); } }
/** * Unwrap the request if we have wrapped it. */ private void unwrapRequest(State state) { if (state.wrapRequest == null) return; ServletRequest previous = null; ServletRequest current = state.outerRequest; while (current != null) { // If we run into the container request we are done if (current instanceof HttpServletRequestImpl) break; // Remove the current request if it is our wrapper if(current == state.wrapRequest) { ServletRequest next = ((ServletRequestWrapper) current).getRequest(); if (previous == null) state.outerRequest = next; else ((ServletRequestWrapper) previous).setRequest(next); break; } // Advance to the next request in the chain previous = current; current = ((ServletRequestWrapper) current).getRequest(); } }
/** * Unwrap the request if we have wrapped it. */ private void unwrapRequest(State state) { if (state.wrapRequest == null) return; ServletRequest previous = null; ServletRequest current = state.outerRequest; while (current != null) { // If we run into the container request we are done if (current instanceof HttpServletRequestImpl) break; // Remove the current request if it is our wrapper if(current == state.wrapRequest) { ServletRequest next = ((ServletRequestWrapper) current).getRequest(); if (previous == null) state.outerRequest = next; else ((ServletRequestWrapper) previous).setRequest(next); break; } // Advance to the next request in the chain previous = current; current = ((ServletRequestWrapper) current).getRequest(); } }
/** * Unwrap the request if we have wrapped it. */ private void unwrapRequest(State state) { if (state.wrapRequest == null) return; ServletRequest previous = null; ServletRequest current = state.outerRequest; while (current != null) { // If we run into the container request we are done if (current instanceof HttpServletRequestImpl) break; // Remove the current request if it is our wrapper if(current == state.wrapRequest) { ServletRequest next = ((ServletRequestWrapper) current).getRequest(); if (previous == null) state.outerRequest = next; else ((ServletRequestWrapper) previous).setRequest(next); break; } // Advance to the next request in the chain previous = current; current = ((ServletRequestWrapper) current).getRequest(); } }