Hello, dear BaseX team,
one question concerning folder $BASEX/webapp/static. Given an HTML page created by a query via REST or RESTXQ execution. It seems to me that referenced resources (e.g. link/@href or img/@src) must be located in that folder or a subfolder of it, and the reference must be "../static/foo.css" or "../static/path/to/subfolder/foo.css", examples: <link rel="stylesheet" type="text/css" href="../static/foo.css"/><link rel="stylesheet" type="text/css" href="../static/foo/foo.css"/>
At least I did not succeed with any other locations, specified by full path or by relative path, assuming different context paths (e.g. the folder containing the query producing the HTML, or $BASEX/bin, or $BASEX). My QUESTION: is that correct, if not - what are the rules? Many thanks,Hans-Jürgen PS: Apologies if this is documented, but I failed to find it, and the complete PDF contains a single occurrence of string "/static" which does not apply.
Hi Hans-Jürgen.
A fixed directory for static resources can be adjusted in the web.xml file; see [1] for further information. Static files can also be delivered via RESTXQ; see [2] on how it’s done by the DBA.
Gutes Neues, Christian
[1] https://docs.basex.org/wiki/Web_Application [2] https://github.com/BaseXdb/basex/blob/master/basex-api/src/main/webapp/dba/c...
On Thu, Jan 6, 2022 at 10:07 AM Hans-Juergen Rennau hrennau@yahoo.de wrote:
Hello, dear BaseX team,
one question concerning folder $BASEX/webapp/static.
Given an HTML page created by a query via REST or RESTXQ execution. It seems to me that referenced resources (e.g. link/@href or img/@src) must be located in that folder or a subfolder of it, and the reference must be "../static/foo.css" or "../static/path/to/subfolder/foo.css", examples:
<link rel="stylesheet" type="text/css" href="../static/foo.css"/> <link rel="stylesheet" type="text/css" href="../static/foo/foo.css"/>
At least I did not succeed with any other locations, specified by full path or by relative path, assuming different context paths (e.g. the folder containing the query producing the HTML, or $BASEX/bin, or $BASEX).
My QUESTION: is that correct, if not - what are the rules?
Many thanks, Hans-Jürgen
PS: Apologies if this is documented, but I failed to find it, and the complete PDF contains a single occurrence of string "/static" which does not apply.
basex-talk@mailman.uni-konstanz.de