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

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSupportFragmentManager (FragmentActivity)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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