the best solution I found in order to point on external folders (generally
on J2ee, not Tapestry specific) without a fixed or a common base path is a
"deployment plan" in Weblogic. Basically, you put in web.xml one(or more)
env-entry with a fixed key and your path(or url, or every config value) as
value(your local machine path) and you read that in a servlet filter or
elsewhere.

On your local machine you have the right values, but they can be different
on dev, test, and production environments: on that servers you apply the
deployment plan to your war or ear, so you can avoid fixed paths or
creating multiple versions of your war with different configurations
inside.

The deployment plan is basically an XPath search&replace of the values you
statically write in web.xml, and changes will be applied before the webapp
starts.

In weblogic there are some little troubles to face, but once you find how
it wants things must be done, it become simple, and the
maven-weblogic-plugin can do that for you while you use it to deploy your
war.


If you don't wanna pay for Weblogic, i read that Apache Geronimo have that
feature, but I never tried it.
In tomcat you can specify the resources in an external file for each
context, so you don't need it.

Cheers,
Giulio

Reply via email to