title: How to use scriptlet inside javascript
body: <p>Can someone test this example and share the results?
  <a href="http://timothypowell.net/blog/?p=23" rel="noreferrer">http://timothypowell.net/blog/?p=23</a><br>
  When I do:</p>
  
  <pre><code>var myVar = '&lt;% request.getContextPath(); %&gt;';
  alert(myVar);
  </code></pre>
  
  <p>I get : <code>'&lt;% request.getContextPath(); %&gt;'.</code></p>
  
  <p>Removing the enclosing single quotes from  '&lt;% request.getContextPath(); %>';
   gives syntax error.
  How can I use the scrptlet or expresion inside a js function?</p>
  
  <p>EDIT: this link has an explanation that helped me:<br>
  <a href="http://www.codingforums.com/showthread.php?t=172082" rel="noreferrer">http://www.codingforums.com/showthread.php?t=172082</a></p>