I have my jstl code inside a javascript file that i am including inside my jsp page. The problem I have is that when i write my jstl code inside a script inside the jsp page it is working fine. but when i write the same code in a separate js file, the jstl code does not work at all. Is there anyway I can get around this? Any help would be appreciated. Here is my code below. Thanks

$("img[name='cancel']").hover(function(){
      var src = "<c:url value='/images/stop.ico'/>";
      $(this).attr("src",src);
  },function(){
      var src = "<c:url value='/images/gtk_close.ico'/>";
      $(this).attr("src",src);
  });
Edit
Report