public Host getHost() { return httpRequest.getHost(); }
/** * Returns an application server URL constructed using the specified request. * * @param request the HTTP servlet request * @return the application server URL constructed */ public static Optional<String> constructApplicationServerURL(Request request) { if (request == null) { return Optional.empty(); } String sslConnectorScheme = "https"; StringBuilder appServerURL = new StringBuilder(sslConnectorScheme + "://"); String requestHost = request.getHost().getName(); Optional<Connector> sslConnector = Arrays.stream(((Engine) request.getHost().getParent()).getService().findConnectors()) .filter(connector -> connector.getScheme().equals(sslConnectorScheme)) .findFirst(); if (sslConnector.isPresent()) { return Optional.of(appServerURL.append(requestHost).append(":") .append(sslConnector.get().getPort()).toString()); } else { return Optional.empty(); } }
/** * Process Comet event. * * @param request Request to be processed * @param response Response to be produced * @param valveContext Valve context used to forward to the next Valve * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ public final void event(Request request, Response response, HttpEvent event) throws IOException, ServletException { // Ask this Host to process this request request.getHost().getPipeline().getFirst().event(request, response, event); }
/** * Process Comet event. * * @param request Request to be processed * @param response Response to be produced * @param event the event * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void event(Request request, Response response, CometEvent event) throws IOException, ServletException { // Ask this Host to process this request request.getHost().getPipeline().getFirst().event(request, response, event); }
/** * Process Comet event. * * @param request Request to be processed * @param response Response to be produced * @param valveContext Valve context used to forward to the next Valve * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ public final void event(Request request, Response response, HttpEvent event) throws IOException, ServletException { // Ask this Host to process this request request.getHost().getPipeline().getFirst().event(request, response, event); }
/** * Process Comet event. * * @param request Request to be processed * @param response Response to be produced * @param event the event * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void event(Request request, Response response, CometEvent event) throws IOException, ServletException { // Ask this Host to process this request request.getHost().getPipeline().getFirst().event(request, response, event); }
/** * Process Comet event. * * @param request Request to be processed * @param response Response to be produced * @param event the event * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void event(Request request, Response response, CometEvent event) throws IOException, ServletException { // Ask this Host to process this request request.getHost().getPipeline().getFirst().event(request, response, event); }
/** * Process Comet event. * * @param request Request to be processed * @param response Response to be produced * @param event the event * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void event(Request request, Response response, CometEvent event) throws IOException, ServletException { // Ask this Host to process this request request.getHost().getPipeline().getFirst().event(request, response, event); }
/** * Process Comet event. * * @param request Request to be processed * @param response Response to be produced * @param event the event * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void event(Request request, Response response, CometEvent event) throws IOException, ServletException { // Ask this Host to process this request request.getHost().getPipeline().getFirst().event(request, response, event); }
/** * Process Comet event. * * @param request Request to be processed * @param response Response to be produced * @param event the event * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void event(Request request, Response response, CometEvent event) throws IOException, ServletException { // Ask this Host to process this request request.getHost().getPipeline().getFirst().event(request, response, event); }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * @param valveContext Valve context used to forward to the next Valve * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { response.sendError (HttpServletResponse.SC_BAD_REQUEST, MESSAGES.noHost(request.getServerName())); return; } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * @param valveContext Valve context used to forward to the next Valve * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { response.sendError (HttpServletResponse.SC_BAD_REQUEST, sm.getString("standardEngine.noHost", request.getServerName())); return; } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * @param valveContext Valve context used to forward to the next Valve * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { response.sendError (HttpServletResponse.SC_BAD_REQUEST, sm.getString("standardEngine.noHost", request.getServerName())); return; } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { // HTTP 0.9 or HTTP 1.0 request without a host when no default host // is defined. This is handled by the CoyoteAdapter. return; } if (request.isAsyncSupported()) { request.setAsyncSupported(host.getPipeline().isAsyncSupported()); } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); } }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { // HTTP 0.9 or HTTP 1.0 request without a host when no default host // is defined. This is handled by the CoyoteAdapter. return; } if (request.isAsyncSupported()) { request.setAsyncSupported(host.getPipeline().isAsyncSupported()); } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); } }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { response.sendError (HttpServletResponse.SC_BAD_REQUEST, sm.getString("standardEngine.noHost", request.getServerName())); return; } if (request.isAsyncSupported()) { request.setAsyncSupported(host.getPipeline().isAsyncSupported()); } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { response.sendError (HttpServletResponse.SC_BAD_REQUEST, sm.getString("standardEngine.noHost", request.getServerName())); return; } if (request.isAsyncSupported()) { request.setAsyncSupported(host.getPipeline().isAsyncSupported()); } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { response.sendError (HttpServletResponse.SC_BAD_REQUEST, sm.getString("standardEngine.noHost", request.getServerName())); return; } if (request.isAsyncSupported()) { request.setAsyncSupported(host.getPipeline().isAsyncSupported()); } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); }
/** * Select the appropriate child Host to process this request, * based on the requested server name. If no matching Host can * be found, return an appropriate HTTP error. * * @param request Request to be processed * @param response Response to be produced * * @exception IOException if an input/output error occurred * @exception ServletException if a servlet error occurred */ @Override public final void invoke(Request request, Response response) throws IOException, ServletException { // Select the Host to be used for this Request Host host = request.getHost(); if (host == null) { response.sendError (HttpServletResponse.SC_BAD_REQUEST, sm.getString("standardEngine.noHost", request.getServerName())); return; } if (request.isAsyncSupported()) { request.setAsyncSupported(host.getPipeline().isAsyncSupported()); } // Ask this Host to process this request host.getPipeline().getFirst().invoke(request, response); }
Response response = (Response) res.getNote(ADAPTER_NOTES); String messageKey = null; if (request != null && request.getHost() != null) { messageKey = "coyoteAdapter.checkRecycled.request"; } else if (response != null && response.getContentWritten() != 0) {