title: Calling Javascript function inside JSP scriplet
body: <p>I have a javascript function that needs to be called under a condition.</p>
  
  <p>The condition is given below</p>
  
  <pre><code>&lt;%if(request.getAttribute("isValidUser").equals("false"))
    {%&gt;
       Redirect();
  &lt;%}%&gt;
  </code></pre>
  
  <p><code>Redirect()</code> is the function name that I have declared and defined in the  section.</p>
  
  <p>When I execute the page I am getting the following error.</p>
  
  <pre><code>    org.apache.jasper.JasperException: An exception occurred 
      processing JSP page /HomePage.jsp at line 136
  </code></pre>
  
  <p>HomePage.jsp:</p>
  
  <pre><code>133:      &lt;p&gt;&lt;input type="password" name="password" id="password" placeholder="Password"/&gt;&lt;/p&gt;
  134:      &lt;span id="nullPassword" class="error"&gt;&lt;/span&gt;
  135:   &lt;/div&gt;&lt;span style="color:red;"&gt;
  136:   &lt;%if(request.getAttribute("isValidUser").equals("false"))
  137:   {%&gt;
  138:        Redirect();
  139:   &lt;%}%&gt;
  </code></pre>
  
  <p>Please help me out.</p>
  
  <p>Thank you.</p>