public final class JettyWebContainerFactory extends Object
Server
instances
for deploying a Servlet.
The default deployed server is an instance of ServletContainer
.
If no initialization parameters are declared (or is null) then root
resource and provider classes will be found by searching the classes
referenced in the java classpath.Modifier and Type | Method and Description |
---|---|
static org.eclipse.jetty.server.Server |
create(String u)
Create a
Server that registers the ServletContainer . |
static org.eclipse.jetty.server.Server |
create(String u,
Class<? extends javax.servlet.Servlet> c)
Create a
Server that registers the declared
servlet class. |
static org.eclipse.jetty.server.Server |
create(String u,
Class<? extends javax.servlet.Servlet> c,
Map<String,String> initParams)
Create a
Server that registers the declared
servlet class. |
static org.eclipse.jetty.server.Server |
create(String u,
Map<String,String> initParams)
Create a
Server that registers the ServletContainer . |
static org.eclipse.jetty.server.Server |
create(URI u)
Create a
Server that registers the ServletContainer . |
static org.eclipse.jetty.server.Server |
create(URI u,
Class<? extends javax.servlet.Servlet> c)
Create a
Server that registers the declared
servlet class. |
static org.eclipse.jetty.server.Server |
create(URI u,
Class<? extends javax.servlet.Servlet> c,
Map<String,String> initParams)
Create a
Server that registers the declared
servlet class. |
static org.eclipse.jetty.server.Server |
create(URI u,
Map<String,String> initParams)
Create a
Server that registers the ServletContainer . |
static org.eclipse.jetty.server.Server |
create(URI u,
javax.servlet.Servlet servlet,
Map<String,String> initParams,
Map<String,String> contextInitParams)
Create a
Server that registers the declared
servlet instance. |
public static org.eclipse.jetty.server.Server create(String u) throws Exception
Server
that registers the ServletContainer
.u
- the URI to create the http server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.public static org.eclipse.jetty.server.Server create(String u, Map<String,String> initParams) throws Exception
Server
that registers the ServletContainer
.u
- the URI to create the http server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.initParams
- the servlet initialization parameters.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.public static org.eclipse.jetty.server.Server create(URI u) throws Exception
Server
that registers the ServletContainer
.u
- the URI to create the http server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.public static org.eclipse.jetty.server.Server create(URI u, Map<String,String> initParams) throws Exception
Server
that registers the ServletContainer
.u
- the URI to create the http server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.initParams
- the servlet initialization parameters.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.public static org.eclipse.jetty.server.Server create(String u, Class<? extends javax.servlet.Servlet> c) throws Exception
Server
that registers the declared
servlet class.u
- the URI to create the http server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.c
- the servlet class.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.public static org.eclipse.jetty.server.Server create(String u, Class<? extends javax.servlet.Servlet> c, Map<String,String> initParams) throws Exception
Server
that registers the declared
servlet class.u
- the URI to create the http server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.c
- the servlet class.initParams
- the servlet initialization parameters.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.public static org.eclipse.jetty.server.Server create(URI u, Class<? extends javax.servlet.Servlet> c) throws Exception
Server
that registers the declared
servlet class.u
- the URI to create the http server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.c
- the servlet class.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.public static org.eclipse.jetty.server.Server create(URI u, Class<? extends javax.servlet.Servlet> c, Map<String,String> initParams) throws Exception
Server
that registers the declared
servlet class.u
- the URI to create the http server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.c
- the servlet class.initParams
- the servlet initialization parameters.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.public static org.eclipse.jetty.server.Server create(URI u, javax.servlet.Servlet servlet, Map<String,String> initParams, Map<String,String> contextInitParams) throws Exception
Server
that registers the declared
servlet instance.u
- the URI to create the HTTP server. The URI scheme must be
equal to "http". The URI user information and host
are ignored If the URI port is not present then port 80 will be
used. The URI query and fragment components are ignored. Only first path segment will be used
as context path, the rest will be ignored.servlet
- the servlet instance.initParams
- the servlet initialization parameters.contextInitParams
- the servlet context initialization parameters.Exception
- if an error occurs creating the container.IllegalArgumentException
- if HTTP server URI is null
.Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.