Well, you could, but I'm willing to bet that you don't have PHP parse .js files.
What you should do is probably rename this .js file to... fileName.php, so that it is parsed by PHP. I'm not so sure about JSP, but in a normal HTML document, you'd reference it like you would any other Javascript file:
<script type="text/javascript" src="fileName.php" />