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

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

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

WebServer.createNewSession介绍

[英]Create a new web session id and object.
[中]创建新的web会话id和对象。

代码示例

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

mimeType = "text/html";
if (session == null) {
  session = server.createNewSession(hostAddr);
  if (!"notAllowed.jsp".equals(file)) {
    file = "index.do";

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

/**
 * Create a session with a given connection.
 *
 * @param conn the connection
 * @return the URL of the web site to access this connection
 */
public String addSession(Connection conn) throws SQLException {
  WebSession session = createNewSession("local");
  session.setShutdownServerOnDisconnect();
  session.setConnection(conn);
  session.put("url", conn.getMetaData().getURL());
  String s = (String) session.get("sessionId");
  return url + "/frame.jsp?jsessionid=" + s;
}

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

/**
 * Create a session with a given connection.
 *
 * @param conn the connection
 * @return the URL of the web site to access this connection
 */
public String addSession(Connection conn) throws SQLException {
  WebSession session = createNewSession("local");
  session.setShutdownServerOnDisconnect();
  session.setConnection(conn);
  session.put("url", conn.getMetaData().getURL());
  String s = (String) session.get("sessionId");
  return url + "/frame.jsp?jsessionid=" + s;
}

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

mimeType = "text/html";
if (session == null) {
  session = server.createNewSession(hostAddr);
  if (!"notAllowed.jsp".equals(file)) {
    file = "index.do";

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

/**
 * Create a session with a given connection.
 *
 * @param conn the connection
 * @return the URL of the web site to access this connection
 */
public String addSession(Connection conn) throws SQLException {
  WebSession session = createNewSession("local");
  session.setShutdownServerOnDisconnect();
  session.setConnection(conn);
  session.put("url", conn.getMetaData().getURL());
  String s = (String) session.get("sessionId");
  return url + "/frame.jsp?jsessionid=" + s;
}

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

mimeType = "text/html";
if (session == null) {
  session = server.createNewSession(hostAddr);
  if (!"notAllowed.jsp".equals(file)) {
    file = "index.do";

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

mimeType = "text/html";
if (session == null) {
  session = server.createNewSession(hostAddr);
  if (!"notAllowed.jsp".equals(file)) {
    file = "index.do";

相关文章

微信公众号

最新文章

更多