org.eclipse.jetty.server.Dispatcher类的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(165)

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

Dispatcher介绍

[英]Servlet RequestDispatcher.
[中]Servlet请求调度器。

代码示例

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

@Override
public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException
{
  forward(request, response, DispatcherType.FORWARD);
}

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

@Override
public RequestDispatcher getNamedDispatcher(String name)
{
  ContextHandler context=org.eclipse.jetty.servlet.ServletContextHandler.this;
  if (_servletHandler==null)
    return null;
  ServletHolder holder = _servletHandler.getServlet(name);
  if (holder==null || !holder.isEnabled())
    return null;
  return new Dispatcher(context, name);
}

代码示例来源:origin: com.github.tomakehurst/wiremock-jre8

@Override
  public void handle(String target, final Request baseRequest, final HttpServletRequest request, HttpServletResponse response) throws IOException {
    if (response.getStatus() == 404) {
      ServletContext adminContext = request.getServletContext().getContext("/__admin");
      Dispatcher requestDispatcher = (Dispatcher) adminContext.getRequestDispatcher("/not-matched");

      try {
        requestDispatcher.error(request, response);
      } catch (ServletException e) {
        throwUnchecked(e);
      }
    } else {
      DEFAULT_HANDLER.handle(target, baseRequest, request, response);
    }
  }
}

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

commitResponse(response,baseRequest);

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

@Override
public RequestDispatcher getNamedDispatcher(String name)
{
  ContextHandler context=org.eclipse.jetty.servlet.ServletContextHandler.this;
  if (_servletHandler==null)
    return null;
  ServletHolder holder = _servletHandler.getServlet(name);
  if (holder==null || !holder.isEnabled())
    return null;
  return new Dispatcher(context, name);
}

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

dispatcher.error(request, response);
return;

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

commitResponse(response,baseRequest);

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

@Override
public RequestDispatcher getNamedDispatcher(String name)
{
  ContextHandler context=org.eclipse.jetty.servlet.ServletContextHandler.this;
  if (_servletHandler==null)
    return null;
  ServletHolder holder = _servletHandler.getServlet(name);
  if (holder==null || !holder.isEnabled())
    return null;
  return new Dispatcher(context, name);
}

代码示例来源:origin: jenkinsci/winstone

@Override
public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException
{
  forward(request, response, DispatcherType.FORWARD);
}

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

dispatcher.error(request, response);
return;

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

commitResponse(response,baseRequest);

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

@Override
public RequestDispatcher getNamedDispatcher(String name)
{
  ContextHandler context=org.eclipse.jetty.servlet.ServletContextHandler.this;
  if (_servletHandler==null)
    return null;
  ServletHolder holder = _servletHandler.getServlet(name);
  if (holder==null || !holder.isEnabled())
    return null;
  return new Dispatcher(context, name);
}

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

public void error(ServletRequest request, ServletResponse response) throws ServletException, IOException
{
  forward(request, response, DispatcherType.ERROR);
}

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

dispatcher.error(request, response);
return;

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

commitResponse(response,baseRequest);

代码示例来源:origin: jenkinsci/winstone

@Override
public RequestDispatcher getNamedDispatcher(String name)
{
  ContextHandler context=org.eclipse.jetty.servlet.ServletContextHandler.this;
  if (_servletHandler==null)
    return null;
  ServletHolder holder = _servletHandler.getServlet(name);
  if (holder==null || !holder.isEnabled())
    return null;
  return new Dispatcher(context, name);
}

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

public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException
{
  forward(request, response, DispatcherType.FORWARD);
}

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

dispatcher.error(request, response);
return;

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

commitResponse(response,baseRequest);

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

@Override
public RequestDispatcher getNamedDispatcher(String name)
{
  ContextHandler context=org.eclipse.jetty.servlet.ServletContextHandler.this;
  if (_servletHandler==null)
    return null;
  ServletHolder holder = _servletHandler.getServlet(name);
  if (holder==null || !holder.isEnabled())
    return null;
  return new Dispatcher(context, name);
}

相关文章