congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
WebServer.getConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
getConnection
method
in
org.h2.server.web.WebServer

Best Java code snippets using org.h2.server.web.WebServer.getConnection (Showing top 8 results out of 315)

origin: com.h2database/h2

private String login() {
  String driver = attributes.getProperty("driver", "");
  String url = attributes.getProperty("url", "");
  String user = attributes.getProperty("user", "");
  String password = attributes.getProperty("password", "");
  session.put("autoCommit", "checked");
  session.put("autoComplete", "1");
  session.put("maxrows", "1000");
  boolean isH2 = url.startsWith("jdbc:h2:");
  try {
    Connection conn = server.getConnection(driver, url, user, password);
    session.setConnection(conn);
    session.put("url", url);
    session.put("user", user);
    session.remove("error");
    settingSave();
    return "frame.jsp";
  } catch (Exception e) {
    session.put("error", getLoginError(e, isH2));
    return "login.jsp";
  }
}
origin: com.h2database/h2

Connection conn;
try {
  conn = server.getConnection(driver, url, user, password);
} finally {
  prof.stopCollecting();
origin: com.h2database/com.springsource.org.h2

private String test() {
  String driver = attributes.getProperty("driver", "");
  String url = attributes.getProperty("url", "");
  String user = attributes.getProperty("user", "");
  String password = attributes.getProperty("password", "");
  session.put("driver", driver);
  session.put("url", url);
  session.put("user", user);
  boolean isH2 = url.startsWith("jdbc:h2:");
  try {
    Connection conn = server.getConnection(driver, url, user, password, this);
    JdbcUtils.closeSilently(conn);
    session.put("error", "${text.login.testSuccessful}");
    return "login.jsp";
  } catch (Exception e) {
    session.put("error", getLoginError(e, isH2));
    return "login.jsp";
  }
}
origin: com.eventsourcing/h2

private String login() {
  String driver = attributes.getProperty("driver", "");
  String url = attributes.getProperty("url", "");
  String user = attributes.getProperty("user", "");
  String password = attributes.getProperty("password", "");
  session.put("autoCommit", "checked");
  session.put("autoComplete", "1");
  session.put("maxrows", "1000");
  boolean isH2 = url.startsWith("jdbc:h2:");
  try {
    Connection conn = server.getConnection(driver, url, user, password);
    session.setConnection(conn);
    session.put("url", url);
    session.put("user", user);
    session.remove("error");
    settingSave();
    return "frame.jsp";
  } catch (Exception e) {
    session.put("error", getLoginError(e, isH2));
    return "login.jsp";
  }
}
origin: org.wowtools/h2

private String login() {
  String driver = attributes.getProperty("driver", "");
  String url = attributes.getProperty("url", "");
  String user = attributes.getProperty("user", "");
  String password = attributes.getProperty("password", "");
  session.put("autoCommit", "checked");
  session.put("autoComplete", "1");
  session.put("maxrows", "1000");
  boolean isH2 = url.startsWith("jdbc:h2:");
  try {
    Connection conn = server.getConnection(driver, url, user, password);
    session.setConnection(conn);
    session.put("url", url);
    session.put("user", user);
    session.remove("error");
    settingSave();
    return "frame.jsp";
  } catch (Exception e) {
    session.put("error", getLoginError(e, isH2));
    return "login.jsp";
  }
}
origin: com.h2database/com.springsource.org.h2

boolean isH2 = url.startsWith("jdbc:h2:");
try {
  Connection conn = server.getConnection(driver, url, user, password, this);
  session.setConnection(conn);
  session.put("url", url);
origin: org.wowtools/h2

Connection conn;
try {
  conn = server.getConnection(driver, url, user, password);
} finally {
  prof.stopCollecting();
origin: com.eventsourcing/h2

Connection conn;
try {
  conn = server.getConnection(driver, url, user, password);
} finally {
  prof.stopCollecting();
org.h2.server.webWebServergetConnection

Javadoc

Open a database connection.

Popular methods of WebServer

  • <init>
  • getSession
    Get the web session object for the given session id.
  • init
  • addSession
    Create a session with a given connection.
  • getAllowOthers
  • getFile
    Read the given file from the file system or from the resources.
  • getStartDateTime
  • setAllowChunked
  • setAllowOthers
  • createNewSession
    Create a new web session id and object.
  • generateSessionId
  • getPort
  • generateSessionId,
  • getPort,
  • getSSL,
  • getSessions,
  • getSetting,
  • getSettingNames,
  • getSettings,
  • loadProperties,
  • readTranslations

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • String (java.lang)
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now