import/export js file Tomcat GET http://localhost:8080/scripts/test net::ERR_ABORTED 404
Export file:
const test = "I`m test string";
export {test};
Import file:
<html>
<head>
<meta charset="utf-8">
<title>Index page</title>
</head>
<body>
<div id="departments"></div>
<div id="employees"></div>
<script type="module">
<%@include file="static/js/index.js"%>
</script>
</body>
</html>
Using in index.js
import {test} from "/scripts/test.js";
console.log(test)
После поисков в инете - я понял, что проблема - в том, что TomCat позиционирует себя, как веб сервер, а для импортов - нужен файловый сервер. Как можно это обойти?
Заранее спасибо =)


