List of usage examples for javax.servlet RequestDispatcher INCLUDE_QUERY_STRING
String INCLUDE_QUERY_STRING
To view the source code for javax.servlet RequestDispatcher INCLUDE_QUERY_STRING.
Click Source Link
From source file:org.ireland.jnetty.webapp.RequestDispatcherImpl.java
private void doInclude(HttpServletRequest request, HttpServletResponse response, HttpInvocation invocation) throws ServletException, IOException { //Wrap the request IncludeRequest wrequest = new IncludeRequest(request, response, invocation); // If we have already been include previously, then keep using the established // original value. Otherwise, this is the first include and we need to establish the values. // Note: the established value on the original request for pathInfo and // for queryString is allowed to be null, but cannot be null for the other values. if (request.getAttribute(RequestDispatcher.INCLUDE_REQUEST_URI) == null) { // ?Include, wrequest.setAttribute(RequestDispatcher.INCLUDE_REQUEST_URI, request.getRequestURI()); wrequest.setAttribute(RequestDispatcher.INCLUDE_CONTEXT_PATH, request.getContextPath()); wrequest.setAttribute(RequestDispatcher.INCLUDE_SERVLET_PATH, request.getServletPath()); wrequest.setAttribute(RequestDispatcher.INCLUDE_PATH_INFO, request.getPathInfo()); wrequest.setAttribute(RequestDispatcher.INCLUDE_QUERY_STRING, request.getQueryString()); }/*from www . ja va 2s. com*/ boolean isValid = false; try { invocation.getFilterChainInvocation().service(wrequest, response); isValid = true; } finally { if (request.getAsyncContext() != null) { // An async request was started during the forward, don't close the // response as it may be written to during the async handling return; } // server/106r, ioc/0310 if (isValid) { finishResponse(response); } } }