You must NEVER put a JS inside WEB-INF directory.
As written in Servlet specifications, whatever you put inside WEB-INF directory will never be directly available to the external world. Only local application resources go there.
So if you want some JS file accesible from outside, put it directly at WAR's ROOT. Something like this:
foo.war
-->/js/
-->bar.js
-->/WEB-INF
-->internal resources here
The URL to access JS will be something like:
http://YOUR_IP:8080/foo/js/bar.js
This of course could vary depending on how you setup your war deployment on your application server.
You do however put JSP files inside WEB-INF directory, only to invoke them from Servlets (you can't directly access them either) with something like:
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("WEB-INF/index.jsp");
This is a common practice if you don't want people accessing directly your JSP files from outside.