Dear Christian, Thank you !
I use RESTXQ to easily transform RDBMS data into XML, And am looking for a way to retrieve configuration parameters like jdbc url, username and password, for example.
How would you initialize persisting variables like a jdbc connection ?
Thank you again for your fantastic job.
Bien à vous, Fabrice
-----Message d'origine----- De : Christian Grün [mailto:christian.gruen@gmail.com] Envoyé : lundi 15 décembre 2014 20:25 À : Fabrice Etanchaud Cc : basex-talk@mailman.uni-konstanz.de Objet : Re: [basex-talk] RESTXQ - access to InitParameters of ServletContext and/or ServletConfig
Hi Fabrice,
I would like to get InitParameters of the ServletContext or ServletConfig instances,
The servlet init parameters are currently accessed by the BaseX itself [1,2], but there is no way to retrieve them from RESTXQ.
Well, that's only partially true. One way to reach the ServletContext init parrameters is to:
• Write a Java class that extends QueryModule [3] • Access queryContext.http in that class (see e.g. [4]) • Call http.req.getServletContext().getInitParameterNames()
I am not sure, though, if that also works for the ServletConfig parameters (maybe you know?).
What do you want to do with that information? What parameters are you interested in? Christian
[1] https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/java/org/bas... [2] https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/java/org/bas... [3] http://docs.basex.org/wiki/Java_Bindings#Context-Awareness [4] https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/java/org/bas...