briankuhn
Aug 19th, 2004, 03:36 PM
Hi all,
I'm trying to setup a demo application that requires no installation other than deploying a war file. I'm trying to use a hsql database that resides in something like /WEB-INF/data/hsql.script. Since hsql allows you to specify this path in it's URL, I'm able to do this using the full path. However, I'd like to be able to do the same thing with the context relative path (/WEB-INF/data/hsql) or somehow inject (at runtime) the full path into my applicationContext.xml file, something like the following snippet. Any ideas?
Thanks,
Brian
<bean id="dataSource"
class="org.sprin...DriverManagerDataSource">
<property name="driverClassName">
<value>org.hsqldb.jdbcDriver</value>
</property>
<property name="url">
<value>jdbc:hsqldb:${webapp-root}/WEB-INF/data/hsql</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value></value>
</property>
</bean>
I'm trying to setup a demo application that requires no installation other than deploying a war file. I'm trying to use a hsql database that resides in something like /WEB-INF/data/hsql.script. Since hsql allows you to specify this path in it's URL, I'm able to do this using the full path. However, I'd like to be able to do the same thing with the context relative path (/WEB-INF/data/hsql) or somehow inject (at runtime) the full path into my applicationContext.xml file, something like the following snippet. Any ideas?
Thanks,
Brian
<bean id="dataSource"
class="org.sprin...DriverManagerDataSource">
<property name="driverClassName">
<value>org.hsqldb.jdbcDriver</value>
</property>
<property name="url">
<value>jdbc:hsqldb:${webapp-root}/WEB-INF/data/hsql</value>
</property>
<property name="username">
<value>sa</value>
</property>
<property name="password">
<value></value>
</property>
</bean>