Currently I'm working on a project and I'm new to eclipse and server stuff.
I'm doing a Dynamic Web Project of a music player. What I'm trying to do is to change the current song playing for another one in a given directory for Example:
I have a Library of music in my computer: /home/user/Music/Library
And inside of Library there are my songs, what I'm trying to do is change the source of my audio tag with the path of the song I want:
<audio id="audioPlayer">
<source id = "source" src="/Songs/song1" type="audio/mpeg">
</audio>
<script>
document.getElementById("source").src = "/home/user/Music/Library/song1.mp3";
document.getElementById("audioPlayer").load();
</script>
When I run this it throws and error 404 (Not Found).
I have an idea of the problem, maybe the server is running into a specific path and the directory doesn't exist there.
I don't want to add the songs into the project, I want the user to specify the path of the library of music.
I am using Apache-Tomcat 8.0 on Ubuntu 18.04.