module jsp fails to point to an external javascript file

Now according to your file structure , the url has to be

recognizer = new Worker('${pageContext.request.contextPath}//moduleResources/radiology/js/recognizer.js');

. i hop u dint miss out the “js”

first try that …and then we shall try optionB

No the recognizer is not found in the js subfolder. If you look at the picture closely, just the radiology.js and html2pdf.bundle.min.js are in the js folder. The rest of the js files ( from audioRecorder.js to recognizer.js) are all found directly in the resources folder

now , the other hard option your going to do, copy the source code of the recogniser.js into a jsp file. e.g recogniser.jsp.,

then , include that jsp in your current page <%@ include file = “recogniser.jsp” %>. then lastly, try to relate with the js source code in the recogniser.jsp directly , withoout usung the link

ovcos make sure the code is placed in <script> tags