As Bear said, it is not recommended.
But if you MUST, I would recommend to do it by adding a
servlet mapping into your web.xml file.
Rename your file to abc.jsp
As a result of this config
- requests to /abc.js get directed to the dynamicJavascriptFile servlet
- That servlet is served by invoking abc.jsp.
The better approach: