> Sorry, I can't speak German, you know how French people are :-( But something must have gone wrong: Your English is pretty good ;)
Cheers, Christian > -----Message d'origine----- > De : Christian Grün [mailto:[email protected]] > Envoyé : mardi 16 décembre 2014 16:10 > À : Fabrice Etanchaud > Cc : [email protected] > Objet : Re: [basex-talk] RESTXQ - access to InitParameters of ServletContext > and/or ServletConfig > > Hi Fabrice, > >> How would you initialize persisting variables like a jdbc connection ? > > You could simply use the doc(...) function in XQuery and access the document > from your web application directory. One more way would be to store the data > in a database instance, but this is probably too much of an overhead in your > case. > > J'espère avoir pu t'aider, > Christian > > >> >> Thank you again for your fantastic job. >> >> Bien à vous, >> Fabrice >> >> >> -----Message d'origine----- >> De : Christian Grün [mailto:[email protected]] >> Envoyé : lundi 15 décembre 2014 20:25 >> À : Fabrice Etanchaud >> Cc : [email protected] >> 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/o >> rg/basex/http/BaseXServlet.java#L38 >> [2] >> https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/java/o >> rg/basex/http/HTTPContext.java#L421 >> [3] http://docs.basex.org/wiki/Java_Bindings#Context-Awareness >> [4] >> https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/java/o >> rg/basex/modules/Session.java#L142

