for this kind of tasks, I use texen with ant.
http://jakarta.apache.org/velocity/texen.html
I set a main java properties file, then the ant-texen task (properly configured) read that file and substitute the variables found into the specified target files with the related values taken from the properties file.
Here's an example... see the "configure" target from the build.xml file at
http://www.pow2.com/download/pow2toolkit_20021107.zip
But in this mode you must manually configure a properties file... moving the problem from DbForms code to the "configuration system".
Luca
Henner Kollmann wrote:
Hi all, For some database systems it is necesary to have the full path name in the connection string, e.g.name = "jdbc:hsqldb:D:/projekte/webapps/dbforms/examples/bookstore/WEB-INF/db_h sqldb/hsqldb" I think it would be nice to have the posibility to can write: name = "jdbc:hsqldb:$(REALPATH)/WEB-INF/db_hsqldb/hsqldb" And dbforms will substitute the expression $(REALPATH) with the real path of the servlet context - servlet.getServletContext().getRealPath("/") So you could write the config file independent of the real location on the server and must not edit the config file after delivering. Would you agree with me? Regards, Henner ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ DbForms Mailing List http://www.wap-force.net/dbforms
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
DbForms Mailing List
http://www.wap-force.net/dbforms
