I am trying to display the value of a property of my pom.xml file on an HTML page, on the client side (so that an admin can see it on the administration page) but I can't find a way to do it.
I have tried with PHP and JS and so on but nothing is working... Here's my last attempt:
function populatePre(url) {
var xhr = new XMLHttpRequest();
xhr.onload = function () {
document.getElementById('contents').textContent = this.responseText;
};
xhr.open('GET', url);
xhr.send();
}
<p id="testButton"><button type="button" onclick=populatePre('C:\path\to\my\pom.xml')>Click Me!</button></p>
<pre id="contents"></pre>
Basically, the HTML page is in a folder and the pom.xml file is in another one (../../path/to/pom.xml). I don't know how to access it nor how to read it...
</div>