org.mortbay.jetty.Server.getContext()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(103)

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

Server.getContext介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

Server server = component.getServers().add(Protocol.HTTPS, port);  
Series<Parameter> parameters = server.getContext().getParameters();
parameters.add("sslContextFactory","org.restlet.engine.ssl.DefaultSslContextFactory");
parameters.add("keyStorePath", "*.jks file");
parameters.add("keyStorePassword", "password");
parameters.add("keyPassword", "password");
parameters.add("keyStoreType", "JKS");

代码示例来源:origin: stackoverflow.com

Component = new Component();
// create server
Server server = component.getServers().add(Protocol.HTTPS, 443); 
// get server parameters
Series<Parameter> parameters = server.getContext().getParameters();
// set parameters
parameters.add("keystorePath", "cert\\testServer.jks");
parameters.add("keystorePassword", "password");
parameters.add("keyPassword", "password");
parameters.add("keystoreType", "JKS");

代码示例来源:origin: mx4j/mx4j-tools

public void deploy(String servletClassName, JMXServiceURL url, Map environment) throws IOException
{
 try
 {
   String urlPattern = resolveServletMapping(url);
   ServletHttpContext context = (ServletHttpContext)getServer().getContext("/");
   context.addServlet(urlPattern, servletClassName);
   // TODO: be sure an undeployed url is not restarted !
   if (!context.isStarted()) context.start();
 }
 catch (Exception x)
 {
   throw new IOException(x.toString());
 }
}

代码示例来源:origin: stackoverflow.com

Series<Parameter> parameters = server.getContext().getParameters();
parameters.add("keystore", "jks/keystore.jks");
parameters.add("keyStorePath", "jks/keystore.jks");

代码示例来源:origin: mx4j/mx4j-tools

public void undeploy(String servletName, JMXServiceURL url, Map environment)
{
 String urlPattern = resolveServletMapping(url);
 ServletHttpContext context = (ServletHttpContext)getServer().getContext("/");
 ServletHandler handler = context.getServletHandler();
 handler.getServletMap().remove(urlPattern);
}

相关文章