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

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

本文整理了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

@Signature
public String path() {
  return request.getPathInfo();
}

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

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

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

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

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

@Override
  public void handle( Request request, HttpServletResponse response ) {
    path.set(request.getPathInfo());
    response.setStatus(HTTP_OK);
  }
};

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

@Override
  public void handle( Request request, HttpServletResponse response ) {
    path.set(request.getPathInfo());
    response.setStatus(HTTP_OK);
  }
};

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

@Override
  public void handle( Request request, HttpServletResponse response ) {
    path.set(request.getPathInfo());
    response.setStatus(HTTP_OK);
  }
};

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

@Override
  public void customize(Connector connector, HttpConfiguration channelConfig, Request request)
  {
    try
    {
      matchAndApply(request.getPathInfo(), request, request.getResponse());
    }
    catch (IOException e)
    {
      throw new RuntimeIOException(e);
    }
  }
}

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

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

  }
}

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

@Override
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException
{
  if (!_asyncSupported)
    throw new IllegalStateException("!asyncSupported");
  HttpChannelState state = getHttpChannelState();
  if (_async==null)
    _async=new AsyncContextState(state);
  AsyncContextEvent event = new AsyncContextEvent(_context,_async,state,this,servletRequest,servletResponse);
  event.setDispatchContext(getServletContext());
  event.setDispatchPath(URIUtil.addPaths(getServletPath(),getPathInfo()));
  state.startAsync(event);
  return _async;
}

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

@Override
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException
{
  if (_asyncNotSupportedSource!=null)
    throw new IllegalStateException("!asyncSupported: "+_asyncNotSupportedSource);
  HttpChannelState state = getHttpChannelState();
  if (_async==null)
    _async=new AsyncContextState(state);
  AsyncContextEvent event = new AsyncContextEvent(_context,_async,state,this,servletRequest,servletResponse);
  event.setDispatchContext(getServletContext());
  event.setDispatchPath(URIUtil.addPaths(getServletPath(),getPathInfo()));
  state.startAsync(event);
  return _async;
}

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

@Override
public void doHandle(final String target, final Request baseRequest,
  final HttpServletRequest request, final HttpServletResponse response)
  throws IOException, ServletException {
 final String newTarget = redirectContext + target;
 RequestUpdateHandler.ForwardedRequest newRequest = new RequestUpdateHandler.ForwardedRequest(
   request, redirectContext, newTarget);
 // if the request already has the /{gatewaypath}/{topology} part then skip
 if (!StringUtils.startsWithIgnoreCase(target, redirectContext)) {
  baseRequest.setPathInfo(redirectContext + baseRequest.getPathInfo());
  baseRequest.setURIPathQuery(redirectContext + baseRequest.getRequestURI());
  LOG.topologyPortMappingUpdateRequest(target, newTarget);
  nextHandle(newTarget, baseRequest, newRequest, response);
 } else {
  nextHandle(target, baseRequest, newRequest, response);
 }
}

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

@Override
public void doHandle(final String target, final Request baseRequest,
  final HttpServletRequest request, final HttpServletResponse response)
  throws IOException, ServletException {
 final String newTarget = redirectContext + target;
 RequestUpdateHandler.ForwardedRequest newRequest = new RequestUpdateHandler.ForwardedRequest(
   request, redirectContext, newTarget);
 // if the request already has the /{gatewaypath}/{topology} part then skip
 if (!StringUtils.startsWithIgnoreCase(target, redirectContext)) {
  baseRequest.setPathInfo(redirectContext + baseRequest.getPathInfo());
  baseRequest.setURIPathQuery(redirectContext + baseRequest.getRequestURI());
  LOG.topologyPortMappingUpdateRequest(target, newTarget);
  nextHandle(newTarget, baseRequest, newRequest, response);
 } else {
  nextHandle(target, baseRequest, newRequest, response);
 }
}

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

public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, request, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  }
  else
    handle(target, request, request, response);
}

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

public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, request, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  }
  else
    handle(target, request, request, response);
}

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

public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, request, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  }
  else
    handle(target, request, request, response);
}

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

public void handle(HttpChannel<?> connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
    LOG.debug("REQUEST "+target+" on "+connection);
  if ("*".equals(target))
  {
    handleOptions(request,response);
    if (!request.isHandled())
      handle(target, request, request, response);
  }
  else
    handle(target, request, request, response);
  if (LOG.isDebugEnabled())
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
}

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

public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, request, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  }
  else
    handle(target, request, request, response);
}

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

public void handle(HttpChannel<?> connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
    LOG.debug("REQUEST "+target+" on "+connection);
  if ("*".equals(target))
  {
    handleOptions(request,response);
    if (!request.isHandled())
      handle(target, request, request, response);
  }
  else
    handle(target, request, request, response);
  if (LOG.isDebugEnabled())
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
}

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

public void handle(AbstractHttpConnection connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
  {
    LOG.debug("REQUEST "+target+" on "+connection);
    handle(target, request, request, response);
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
  }
  else
    handle(target, request, request, response);
}

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

public void handle(HttpChannel<?> connection) throws IOException, ServletException
{
  final String target=connection.getRequest().getPathInfo();
  final Request request=connection.getRequest();
  final Response response=connection.getResponse();
  if (LOG.isDebugEnabled())
    LOG.debug(request.getDispatcherType()+" "+request.getMethod()+" "+target+" on "+connection);
  if (HttpMethod.OPTIONS.is(request.getMethod()) || "*".equals(target))
  {
    if (!HttpMethod.OPTIONS.is(request.getMethod()))
      response.sendError(HttpStatus.BAD_REQUEST_400);
    handleOptions(request,response);
    if (!request.isHandled())
      handle(target, request, request, response);
  }
  else
    handle(target, request, request, response);
  if (LOG.isDebugEnabled())
    LOG.debug("RESPONSE "+target+"  "+connection.getResponse().getStatus()+" handled="+request.isHandled());
}

相关文章

微信公众号

最新文章

更多

Request类方法