title: Pass a JSP variable as parameter to javascript function
body: <p>I have a function defined inside the script tags of head.(in a JSP)
  I want to declare a string variable in the JSP and pass it as a parameter to this function</p>
  
  <pre><code>&lt;%  String uname ="multiple"; %&gt;
  &lt;form action="ExampleServlet" method="post" onclick="pagetype(${uname});"&gt;&lt;br&gt;
      &lt;input type="submit" name="Log in" value="Login" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>But this doesn't work.
  need Help</p>