Thanks. The web server parameters are clarified, but: What about the ".h2.server.properties" that the CONSOLE reads to build the SAVED SETTINGS?
#H2 Server Properties #Tue Nov 30 21:02:02 GMT 2010 0=H2 (Server)|org.h2.Driver|jdbc\:h2\:tcp\://localhost/database|sa 1=PostgreSQL|org.postgresql.Driver|jdbc\:postgresql\:database|postgres 2=MySQL|com.mysql.jdbc.Driver|jdbc\:mysql\://localhost/database|root 3=H2 (Embedded)|org.h2.Driver|jdbc\:h2\:file\:\\\\eclipse\\\\database| sa webAllowOthers=false webPort=8082 webSSL=false I understand that webPort and webSSL are irrelevant for the Embedded webServer, but the console IS reading the config file located in the System USER folder... On Nov 25, 8:32 pm, Sergi Vladykin <[email protected]> wrote: > To specify the port use string arguments like that > Server.createWebServer("-webPort", "100500").start(); > See alsohttp://h2database.com/javadoc/org/h2/tools/Server.html#main_String... > > If you running inside of eclipse it would be better not to use > external config files. > > On 24 ноя, 19:06, marcolopes <[email protected]> wrote: > > > Great! Works like a charm. > > > I have a few doubts: > > > 1) As far as i can see, the embedded server does not take > > the .h2.server.properties file into account. Is this configuration > > file only used with the local or remote server? If so, how can we > > specify the PORT of the embedded server? > > > 2) The console USES the .h2.server.properties. Can i specify a path > > for the console to read that file? I can't find any methods in > > org.h2.tools.Server (the purpose is, for example, to make a portable > > app that will have the config file on the path we need to) > > > thanks. > > > On Nov 24, 3:41 pm, Sergi Vladykin <[email protected]> wrote: > > > > You should not use console but just start web server directly from > > > your app > > > org.h2.tools.Server.createWebServer().start(); > > > for example on plugin initialization and then manually open views or > > > editors with browser and point it to correct url. > > > > On Nov 24, 6:11 pm, marcolopes <[email protected]> wrote: > > > > > I have tested H2 as a server, and now i have it "embedded" in a > > > >Eclipse RCPJava App. > > > > > Everything works just fine connecting to theDatabase engine. Embedded > > > > (local) connection jdbc:h2:[file:][] > > > > > Now, can i connect to the H2 HTTP Console using the Embedded server? > > > > > Virtually, allEclipse RCPviews have browser capability, so the > > > > preferred way would be to execute the console inside em RCP view. > > > > > Basically i need to set the browser url inside the view: > > > > browser.setUrl(url); > > > > > But the H2 console must be called specifically with: > > > > org.h2.tools.Server.openBrowser(url); This opens the the console into > > > > an external browser and does not connect to the embedded browser. > > > > > thanks. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
