org.eclipse.jetty.server.Request.getPathInfo()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(10.1k)|赞(0)|评价(0)|浏览(189)

本文整理了Java中org.eclipse.jetty.server.Request.getPathInfo方法的一些代码示例,展示了Request.getPathInfo的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getPathInfo方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:getPathInfo

Request.getPathInfo介绍

暂无

代码示例

代码示例来源:origin: jphp-group/jphp

  1. @Signature
  2. public String path() {
  3. return request.getPathInfo();
  4. }

代码示例来源:origin: org.keycloak/spring-boot-container-bundle

  1. @Override
  2. public String getRelativePath() {
  3. return request.getServletPath() + (request.getPathInfo() != null ? request.getPathInfo() : "");
  4. }

代码示例来源:origin: org.keycloak/keycloak-jetty-adapter-spi

  1. @Override
  2. public String getRelativePath() {
  3. return request.getServletPath() + (request.getPathInfo() != null ? request.getPathInfo() : "");
  4. }

代码示例来源:origin: kiegroup/droolsjbpm-integration

  1. @Override
  2. public void handle( Request request, HttpServletResponse response ) {
  3. path.set(request.getPathInfo());
  4. response.setStatus(HTTP_OK);
  5. }
  6. };

代码示例来源:origin: kiegroup/droolsjbpm-integration

  1. @Override
  2. public void handle( Request request, HttpServletResponse response ) {
  3. path.set(request.getPathInfo());
  4. response.setStatus(HTTP_OK);
  5. }
  6. };

代码示例来源:origin: kiegroup/droolsjbpm-integration

  1. @Override
  2. public void handle( Request request, HttpServletResponse response ) {
  3. path.set(request.getPathInfo());
  4. response.setStatus(HTTP_OK);
  5. }
  6. };

代码示例来源:origin: org.eclipse.jetty/jetty-rewrite

  1. @Override
  2. public void customize(Connector connector, HttpConfiguration channelConfig, Request request)
  3. {
  4. try
  5. {
  6. matchAndApply(request.getPathInfo(), request, request.getResponse());
  7. }
  8. catch (IOException e)
  9. {
  10. throw new RuntimeIOException(e);
  11. }
  12. }
  13. }

代码示例来源:origin: org.fabric3/fabric3-jetty

  1. public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
  2. if (!request.isSecure()) {
  3. baseRequest.getResponse().sendRedirect("https://" + baseRequest.getServerName() + ":" + httpsPort + baseRequest.getPathInfo());
  4. baseRequest.setHandled(true);
  5. } else {
  6. getHandler().handle(target, baseRequest, request, response);
  7. }
  8. }
  9. }

代码示例来源:origin: Nextdoor/bender

  1. @Override
  2. public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException
  3. {
  4. if (!_asyncSupported)
  5. throw new IllegalStateException("!asyncSupported");
  6. HttpChannelState state = getHttpChannelState();
  7. if (_async==null)
  8. _async=new AsyncContextState(state);
  9. AsyncContextEvent event = new AsyncContextEvent(_context,_async,state,this,servletRequest,servletResponse);
  10. event.setDispatchContext(getServletContext());
  11. event.setDispatchPath(URIUtil.addPaths(getServletPath(),getPathInfo()));
  12. state.startAsync(event);
  13. return _async;
  14. }

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server

  1. @Override
  2. public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException
  3. {
  4. if (_asyncNotSupportedSource!=null)
  5. throw new IllegalStateException("!asyncSupported: "+_asyncNotSupportedSource);
  6. HttpChannelState state = getHttpChannelState();
  7. if (_async==null)
  8. _async=new AsyncContextState(state);
  9. AsyncContextEvent event = new AsyncContextEvent(_context,_async,state,this,servletRequest,servletResponse);
  10. event.setDispatchContext(getServletContext());
  11. event.setDispatchPath(URIUtil.addPaths(getServletPath(),getPathInfo()));
  12. state.startAsync(event);
  13. return _async;
  14. }

代码示例来源:origin: org.apache.knox/gateway-server

  1. @Override
  2. public void doHandle(final String target, final Request baseRequest,
  3. final HttpServletRequest request, final HttpServletResponse response)
  4. throws IOException, ServletException {
  5. final String newTarget = redirectContext + target;
  6. RequestUpdateHandler.ForwardedRequest newRequest = new RequestUpdateHandler.ForwardedRequest(
  7. request, redirectContext, newTarget);
  8. // if the request already has the /{gatewaypath}/{topology} part then skip
  9. if (!StringUtils.startsWithIgnoreCase(target, redirectContext)) {
  10. baseRequest.setPathInfo(redirectContext + baseRequest.getPathInfo());
  11. baseRequest.setURIPathQuery(redirectContext + baseRequest.getRequestURI());
  12. LOG.topologyPortMappingUpdateRequest(target, newTarget);
  13. nextHandle(newTarget, baseRequest, newRequest, response);
  14. } else {
  15. nextHandle(target, baseRequest, newRequest, response);
  16. }
  17. }

代码示例来源:origin: apache/knox

  1. @Override
  2. public void doHandle(final String target, final Request baseRequest,
  3. final HttpServletRequest request, final HttpServletResponse response)
  4. throws IOException, ServletException {
  5. final String newTarget = redirectContext + target;
  6. RequestUpdateHandler.ForwardedRequest newRequest = new RequestUpdateHandler.ForwardedRequest(
  7. request, redirectContext, newTarget);
  8. // if the request already has the /{gatewaypath}/{topology} part then skip
  9. if (!StringUtils.startsWithIgnoreCase(target, redirectContext)) {
  10. baseRequest.setPathInfo(redirectContext + baseRequest.getPathInfo());
  11. baseRequest.setURIPathQuery(redirectContext + baseRequest.getRequestURI());
  12. LOG.topologyPortMappingUpdateRequest(target, newTarget);
  13. nextHandle(newTarget, baseRequest, newRequest, response);
  14. } else {
  15. nextHandle(target, baseRequest, newRequest, response);
  16. }
  17. }

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

  1. public void handle(AbstractHttpConnection connection) throws IOException, ServletException
  2. {
  3. final String target=connection.getRequest().getPathInfo();
  4. final Request request=connection.getRequest();
  5. final Response response=connection.getResponse();
  6. if (LOG.isDebugEnabled())
  7. {
  8. LOG.debug("REQUEST "+target+" on "+connection);
  9. handle(target, request, request, response);
  10. LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  11. }
  12. else
  13. handle(target, request, request, response);
  14. }

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

  1. public void handle(AbstractHttpConnection connection) throws IOException, ServletException
  2. {
  3. final String target=connection.getRequest().getPathInfo();
  4. final Request request=connection.getRequest();
  5. final Response response=connection.getResponse();
  6. if (LOG.isDebugEnabled())
  7. {
  8. LOG.debug("REQUEST "+target+" on "+connection);
  9. handle(target, request, request, response);
  10. LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  11. }
  12. else
  13. handle(target, request, request, response);
  14. }

代码示例来源:origin: org.eclipse.jetty/server

  1. public void handle(AbstractHttpConnection connection) throws IOException, ServletException
  2. {
  3. final String target=connection.getRequest().getPathInfo();
  4. final Request request=connection.getRequest();
  5. final Response response=connection.getResponse();
  6. if (LOG.isDebugEnabled())
  7. {
  8. LOG.debug("REQUEST "+target+" on "+connection);
  9. handle(target, request, request, response);
  10. LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  11. }
  12. else
  13. handle(target, request, request, response);
  14. }

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

  1. public void handle(HttpChannel<?> connection) throws IOException, ServletException
  2. {
  3. final String target=connection.getRequest().getPathInfo();
  4. final Request request=connection.getRequest();
  5. final Response response=connection.getResponse();
  6. if (LOG.isDebugEnabled())
  7. LOG.debug("REQUEST "+target+" on "+connection);
  8. if ("*".equals(target))
  9. {
  10. handleOptions(request,response);
  11. if (!request.isHandled())
  12. handle(target, request, request, response);
  13. }
  14. else
  15. handle(target, request, request, response);
  16. if (LOG.isDebugEnabled())
  17. LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  18. }

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server

  1. public void handle(AbstractHttpConnection connection) throws IOException, ServletException
  2. {
  3. final String target=connection.getRequest().getPathInfo();
  4. final Request request=connection.getRequest();
  5. final Response response=connection.getResponse();
  6. if (LOG.isDebugEnabled())
  7. {
  8. LOG.debug("REQUEST "+target+" on "+connection);
  9. handle(target, request, request, response);
  10. LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  11. }
  12. else
  13. handle(target, request, request, response);
  14. }

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

  1. public void handle(HttpChannel<?> connection) throws IOException, ServletException
  2. {
  3. final String target=connection.getRequest().getPathInfo();
  4. final Request request=connection.getRequest();
  5. final Response response=connection.getResponse();
  6. if (LOG.isDebugEnabled())
  7. LOG.debug("REQUEST "+target+" on "+connection);
  8. if ("*".equals(target))
  9. {
  10. handleOptions(request,response);
  11. if (!request.isHandled())
  12. handle(target, request, request, response);
  13. }
  14. else
  15. handle(target, request, request, response);
  16. if (LOG.isDebugEnabled())
  17. LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  18. }

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

  1. public void handle(AbstractHttpConnection connection) throws IOException, ServletException
  2. {
  3. final String target=connection.getRequest().getPathInfo();
  4. final Request request=connection.getRequest();
  5. final Response response=connection.getResponse();
  6. if (LOG.isDebugEnabled())
  7. {
  8. LOG.debug("REQUEST "+target+" on "+connection);
  9. handle(target, request, request, response);
  10. LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  11. }
  12. else
  13. handle(target, request, request, response);
  14. }

代码示例来源:origin: Nextdoor/bender

  1. public void handle(HttpChannel<?> connection) throws IOException, ServletException
  2. {
  3. final String target=connection.getRequest().getPathInfo();
  4. final Request request=connection.getRequest();
  5. final Response response=connection.getResponse();
  6. if (LOG.isDebugEnabled())
  7. LOG.debug(request.getDispatcherType()+" "+request.getMethod()+" "+target+" on "+connection);
  8. if (HttpMethod.OPTIONS.is(request.getMethod()) || "*".equals(target))
  9. {
  10. if (!HttpMethod.OPTIONS.is(request.getMethod()))
  11. response.sendError(HttpStatus.BAD_REQUEST_400);
  12. handleOptions(request,response);
  13. if (!request.isHandled())
  14. handle(target, request, request, response);
  15. }
  16. else
  17. handle(target, request, request, response);
  18. if (LOG.isDebugEnabled())
  19. LOG.debug("RESPONSE "+target+" "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  20. }

相关文章

Request类方法