title: Showing a jsp in a loop till user enters a correct value
body: <p>I am quite new to web programming. So, here is what my problem is
  I want user to enter a number on HTML and my servlet has some logic to check if the number is correct I show ajsp with one msg if not then other msg. So, this part is quite simple and i achieved it easily. But my problem is that I want to keep on doing this. So, I want once user see result.jsp. He should be directed back to form.html but with different background color. 
  So I tried something like this in my jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
  pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
   "http://www.w3.org/TR/html4/loose.dtd"&gt;
   &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Passing the input value to a session variable&lt;/title&gt;
    &lt;%
      String bgColor = request.getParameter("COLOR");
  
        if (bgColor == null)
           bgColor = "WHITE";
    %&gt;
  &lt;/head&gt;
  &lt;body BGCOLOR="&lt;%=bgColor%&gt;"&gt;
     &lt;%
      String msg = (String) session.getAttribute("message");
      out.print(msg);
  %&gt;
  &lt;a href="login.html"&gt; &lt;input type="submit" value="Try again!!"
      name="TRY"&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>This one redirects me to login.html but the color is lost. How can i pass background color to login.html so that background color is changed. </p>
  
  <p>Please some suggestions. 
  Thanks</p>