本文整理了Java中org.eclipse.jetty.server.Request.getPathInfo
方法的一些代码示例,展示了Request.getPathInfo
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getPathInfo
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称: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());
}
内容来源于网络,如有侵权,请联系作者删除!