本文整理了Java中org.eclipse.jetty.server.Dispatcher.<init>()
方法的一些代码示例,展示了Dispatcher.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dispatcher.<init>()
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Dispatcher
类名称:Dispatcher
方法名:<init>
[英]Constructor.
[中]构造器。
代码示例来源: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: 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: 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: 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: 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);
}
代码示例来源:origin: com.ovea.tajin.servers/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);
}
代码示例来源: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: Nextdoor/bender
@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.server/tajin-server-jetty9
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
String query = null;
int q = 0;
if ((q = uriInContext.indexOf('?')) > 0)
{
query = uriInContext.substring(q + 1);
uriInContext = uriInContext.substring(0,q);
}
// if ((q = uriInContext.indexOf(';')) > 0)
// uriInContext = uriInContext.substring(0,q);
String pathInContext = URIUtil.canonicalPath(URIUtil.decodePath(uriInContext));
String uri = URIUtil.addPaths(getContextPath(),uriInContext);
ContextHandler context = ContextHandler.this;
return new Dispatcher(context,uri,pathInContext,query);
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
String query = null;
int q = 0;
if ((q = uriInContext.indexOf('?')) > 0)
{
query = uriInContext.substring(q + 1);
uriInContext = uriInContext.substring(0,q);
}
// if ((q = uriInContext.indexOf(';')) > 0)
// uriInContext = uriInContext.substring(0,q);
String pathInContext = URIUtil.canonicalPath(URIUtil.decodePath(uriInContext));
String uri = URIUtil.addPaths(getContextPath(),uriInContext);
ContextHandler context = ContextHandler.this;
return new Dispatcher(context,uri,pathInContext,query);
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
String query = null;
int q = 0;
if ((q = uriInContext.indexOf('?')) > 0)
{
query = uriInContext.substring(q + 1);
uriInContext = uriInContext.substring(0,q);
}
String pathInContext = URIUtil.canonicalPath(URIUtil.decodePath(uriInContext));
if (pathInContext!=null)
{
String uri = URIUtil.addPaths(getContextPath(),uriInContext);
ContextHandler context = ContextHandler.this;
return new Dispatcher(context,uri,pathInContext,query);
}
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: org.eclipse.jetty/server
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
String query = null;
int q = 0;
if ((q = uriInContext.indexOf('?')) > 0)
{
query = uriInContext.substring(q + 1);
uriInContext = uriInContext.substring(0,q);
}
// if ((q = uriInContext.indexOf(';')) > 0)
// uriInContext = uriInContext.substring(0,q);
String pathInContext = URIUtil.canonicalPath(URIUtil.decodePath(uriInContext));
String uri = URIUtil.addPaths(getContextPath(),uriInContext);
ContextHandler context = ContextHandler.this;
return new Dispatcher(context,uri,pathInContext,query);
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
String query = null;
int q = 0;
if ((q = uriInContext.indexOf('?')) > 0)
{
query = uriInContext.substring(q + 1);
uriInContext = uriInContext.substring(0,q);
}
String pathInContext = URIUtil.canonicalPath(URIUtil.decodePath(uriInContext));
if (pathInContext!=null)
{
String uri = URIUtil.addPaths(getContextPath(),uriInContext);
ContextHandler context = ContextHandler.this;
return new Dispatcher(context,uri,pathInContext,query);
}
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
String query = null;
int q = 0;
if ((q = uriInContext.indexOf('?')) > 0)
{
query = uriInContext.substring(q + 1);
uriInContext = uriInContext.substring(0,q);
}
String pathInContext = URIUtil.canonicalPath(URIUtil.decodePath(uriInContext));
if (pathInContext!=null)
{
String uri = URIUtil.addPaths(getContextPath(),uriInContext);
ContextHandler context = ContextHandler.this;
return new Dispatcher(context,uri,pathInContext,query);
}
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
String query = null;
int q = 0;
if ((q = uriInContext.indexOf('?')) > 0)
{
query = uriInContext.substring(q + 1);
uriInContext = uriInContext.substring(0,q);
}
String pathInContext = URIUtil.canonicalPath(URIUtil.decodePath(uriInContext));
if (pathInContext!=null)
{
String uri = URIUtil.addPaths(getContextPath(),uriInContext);
ContextHandler context = ContextHandler.this;
return new Dispatcher(context,uri,pathInContext,query);
}
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: Nextdoor/bender
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
String query = null;
int q = 0;
if ((q = uriInContext.indexOf('?')) > 0)
{
query = uriInContext.substring(q + 1);
uriInContext = uriInContext.substring(0,q);
}
String pathInContext = URIUtil.canonicalPath(URIUtil.decodePath(uriInContext));
if (pathInContext!=null)
{
String uri = URIUtil.addPaths(getContextPath(),uriInContext);
ContextHandler context = ContextHandler.this;
return new Dispatcher(context,uri,pathInContext,query);
}
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
HttpURI uri = new HttpURI(null,null,0,uriInContext);
String pathInfo=URIUtil.canonicalPath(uri.getDecodedPath());
if (pathInfo==null)
return null;
String contextPath=getContextPath();
if (contextPath!=null && contextPath.length()>0)
uri.setPath(URIUtil.addPaths(contextPath,uri.getPath()));
return new Dispatcher(ContextHandler.this,uri,pathInfo);
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
代码示例来源:origin: jenkinsci/winstone
@Override
public RequestDispatcher getRequestDispatcher(String uriInContext)
{
// uriInContext is encoded, potentially with query
if (uriInContext == null)
return null;
if (!uriInContext.startsWith("/"))
return null;
try
{
HttpURI uri = new HttpURI(null,null,0,uriInContext);
String pathInfo = URIUtil.canonicalPath(uri.getDecodedPath());
if (pathInfo == null)
return null;
String contextPath = getContextPath();
if (contextPath != null && contextPath.length() > 0)
uri.setPath(URIUtil.addPaths(contextPath,uri.getPath()));
return new Dispatcher(ContextHandler.this,uri,pathInfo);
}
catch (Exception e)
{
LOG.ignore(e);
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!