title: Pass JSP value to external Javascript file
body: <p>Is there a way that I can pass a JSP variable value to an external Javascript file by using only Javascript and JSP. Something like:</p>
  
  <p><b>JSP</b></p>
  
  <pre>
  String str = "Hello";
  </pre>
  
  <p><b>
  external.js
  </b></p>
  
  <pre>
  //not working
  var str = "&lt;%=str%>";
  </pre>
  
  <p>Thanks.</p>