title: Random number generation in JSP using java
body: <p>I want to generate random numbers in JSP.</p>
  
  <p>I have created java code to generate a random number in a JSP page and output the random number in a textbox.</p>
  
  <pre><code>&lt;%@page import="java.util.*" %&gt;
  &lt;%
  Random rand = new Random();
  int n = rand.nextInt(90000) + 10000;
  System.out.println(n);
  %&gt;
  &lt;html&gt;
      &lt;body&gt;
          ORDER NO  &lt;input type="text" name="order" value=""/&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am not getting output for this code, can anyone suggest why?</p>