You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Age Mooy <am...@home.nl> on 2002/03/12 03:05:38 UTC

Using ${applicationRoot} in Torque.properties (Torque-3.0-dev)

Hi,

I'm using turbine-2 with the decoupled Torque from the latest tdk snapshot and I'm running into some problems
with Hypersonic jdbc urls. In 2.1 apps I am a happy user of the ${applicationRoot} helper variable to keep my
database urls relative, but that var is not the same in the decoupled Torque.

The Torque.properties file has the following line:

torque.applicationRoot = .

But at runtime that points to the tomcat/bin directory. The torque.log file ends up in tomcat/bin/logs and all
my database calls fail with Hypersonic IO errors because the database can't be found. The url in
Torque.properties is:

jdbc:hsqldb:${applicationRoot}/WEB-INF/db/hsqldb-local

With this behaviour I'm forced back to hardcoding the absolute path to the database, which makes my apps
harder to move.

Is there any way to make Torque deal with this in a cleaner way ?

Age



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using ${applicationRoot} in Torque.properties (Torque-3.0-dev)

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
Attached is a message I sent a few weeks ago with a workaround I came up
with.

    Erik


----- Original Message -----
From: "Age Mooy" <am...@home.nl>
To: "Turbine-User" <tu...@jakarta.apache.org>
Sent: Monday, March 11, 2002 9:05 PM
Subject: Using ${applicationRoot} in Torque.properties (Torque-3.0-dev)


> Hi,
>
> I'm using turbine-2 with the decoupled Torque from the latest tdk snapshot
and I'm running into some problems
> with Hypersonic jdbc urls. In 2.1 apps I am a happy user of the
${applicationRoot} helper variable to keep my
> database urls relative, but that var is not the same in the decoupled
Torque.
>
> The Torque.properties file has the following line:
>
> torque.applicationRoot = .
>
> But at runtime that points to the tomcat/bin directory. The torque.log
file ends up in tomcat/bin/logs and all
> my database calls fail with Hypersonic IO errors because the database
can't be found. The url in
> Torque.properties is:
>
> jdbc:hsqldb:${applicationRoot}/WEB-INF/db/hsqldb-local
>
> With this behaviour I'm forced back to hardcoding the absolute path to the
database, which makes my apps
> harder to move.
>
> Is there any way to make Torque deal with this in a cleaner way ?
>
> Age
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>