title: Convert JSP java code
body: <p>I have a web application, I'm using JSP, so when I insert java code I start opening it as <code>&lt;%%&gt;</code> but I want to use <code>&lt;%!%&gt;</code> how can I do it?</p>
  
  <p>There is my code: </p>
  
  <pre><code>  &lt;body&gt;
           &lt;h1&gt;Factorial&lt;/h1&gt;
  
      &lt;form action="" method=post&gt;
    &lt;input type="number" name="cantidad" min="1"&gt;
     &lt;input type= "submit" value=submit&gt;
       &lt;/form&gt; 
             &lt;% 
  
         String numero=request.getParameter("cantidad");
  
   if(numero != null){
       Integer num = Integer.parseInt(request.getParameter("cantidad"));
        if(num != null){
            int res =1;
  
           for (int s=1; s &lt;=num; s++){
               res *=s;
           }
           out.print(res);
        }
  
   }
  
  
      %&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>So, how can I do that?</p>