This is a quite old thread, but it is one I bumped into when I had the same problem. Since I thought of a solution myself, I will post it here in case it helps somebody in the future.
The html ( or jsp ) file looks for the text inside the external file declared as javascript source.
Tomcat ( or similar ) only interpret JSTL tags within files with the .jsp extension ( or maybe some other ones too, but it is irrelevant for this answer ).
So, rename your .js file to give it a .jsp extension ( javascript.js to javascript_js.jsp for example )
Add those lines at the top of javascript_js.jsp:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
and just leave the code it unchanged.
Obviously, you also need to add more prefixes if you use some other than c: in the header.
If you use Eclipse ( don't know about other IDEs ), it will assume it is not a javascript file and you lose the colour scheme for the different keywords ( var, function and so on ), var name auto completion and auto indentation.
To fool the IDE, you can add
// <script>
as a js comment, before the actual code ( after the "<%@" declarations ), and
// </script>
at the end of the file, again as a js comment.
It worked for me.