On 10/03/2021 19:44, Rony G. Flatscher (Apache) wrote:
For a little nutshell example I would like to use SQLite as the JDBC driver includes the native code for all the major operating systems already (this way a user does not really need to install SQLite just place its JDBC driver in the lib directory).The SQLite database (with sample data) should reside in the webapp itself, maybe in a subdirectory named "data". Is it possible to define a "Resource" of type "javax.sql.DataSource" and use some variable that would resolve the contextPath and that can be used in the "url" attribute? (The Resource definition should be contained placed in the webapps' "META-INF/context.xml" Content element.) There are samples that show how to use "${catalina.home}" as part of such a path. Is there a variable that represents the contextPath of the webapp such that one can use that in the "url" attribute?
Not currently, no. It would be a little tricky to implement given how ${...} replacement currently works.
Mark --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
