org.h2.server.web.WebServer.init()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(176)

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

WebServer.init介绍

暂无

代码示例

代码示例来源:origin: com.h2database/h2

@Override
public void init() {
  ServletConfig config = getServletConfig();
  Enumeration<?> en = config.getInitParameterNames();
  ArrayList<String> list = New.arrayList();
  while (en.hasMoreElements()) {
    String name = en.nextElement().toString();
    String value = config.getInitParameter(name);
    if (!name.startsWith("-")) {
      name = "-" + name;
    }
    list.add(name);
    if (value.length() > 0) {
      list.add(value);
    }
  }
  String[] args = list.toArray(new String[0]);
  server = new WebServer();
  server.setAllowChunked(false);
  server.init(args);
}

代码示例来源:origin: com.h2database/com.springsource.org.h2

public void init() throws ServletException {
  ServletConfig config = getServletConfig();
  Enumeration en = config.getInitParameterNames();
  ArrayList list = new ArrayList();
  while (en.hasMoreElements()) {
    String name = en.nextElement().toString();
    String value = config.getInitParameter(name);
    if (!name.startsWith("-")) {
      name = "-" + name;
    }
    list.add(name);
    if (value.length() > 0) {
      list.add(value);
    }
  }
  String[] args = new String[list.size()];
  list.toArray(args);
  server = new WebServer();
  try {
    server.init(args);
  } catch (Exception e) {
    throw new ServletException("Init failed", e);
  }
}

代码示例来源:origin: org.leapframework/jmms-engine

@Override
public void init(ServletConfig config) throws ServletException {
  server = new WebServer();
  server.setAllowChunked(false);
  server.init(new String[]{});
}

代码示例来源:origin: com.eventsourcing/h2

@Override
public void init() {
  ServletConfig config = getServletConfig();
  Enumeration<?> en = config.getInitParameterNames();
  ArrayList<String> list = New.arrayList();
  while (en.hasMoreElements()) {
    String name = en.nextElement().toString();
    String value = config.getInitParameter(name);
    if (!name.startsWith("-")) {
      name = "-" + name;
    }
    list.add(name);
    if (value.length() > 0) {
      list.add(value);
    }
  }
  String[] args = new String[list.size()];
  list.toArray(args);
  server = new WebServer();
  server.setAllowChunked(false);
  server.init(args);
}

代码示例来源:origin: org.wowtools/h2

@Override
public void init() {
  ServletConfig config = getServletConfig();
  Enumeration<?> en = config.getInitParameterNames();
  ArrayList<String> list = New.arrayList();
  while (en.hasMoreElements()) {
    String name = en.nextElement().toString();
    String value = config.getInitParameter(name);
    if (!name.startsWith("-")) {
      name = "-" + name;
    }
    list.add(name);
    if (value.length() > 0) {
      list.add(value);
    }
  }
  String[] args = new String[list.size()];
  list.toArray(args);
  server = new WebServer();
  server.setAllowChunked(false);
  server.init(args);
}

代码示例来源:origin: com.atlassian.support/achoo-database-console-common

public HackedWebServer(String[] args, HackedWebServlet servlet)
{
  //without this response won't be written back
  super.setAllowChunked(false);
  super.setAllowOthers(true);
  super.init(args);
  //if there was ever h2 installation then servlet will try to init defaults again
  super.setAllowChunked(false);
  super.setAllowOthers(true);
  
  this.servlet = servlet;
  //create single session which will be maintained through plugin lifecycle
  this.session = this.createNewSession("local");
}

相关文章