title: represent a value as a rating as stars (using radio buttons) in JSP
body: <p>I'm trying to have a rating system using radio buttons in JSP ...Everything is working just fine .. but i need to represent an integer as stars... for example if the value is 2.. the JSP page should return 2 stars out of five... etc..</p>
  
  <pre><code>    &lt;div id="rate1"&gt;
  
          &lt;input type="radio" name="rating" value="1" class="star"&gt;
          &lt;input type="radio" name="rating" value="2" class="star"&gt;
          &lt;input type="radio" name="rating" value="3" class="star"&gt;
          &lt;input type="radio" name="rating" value="4" class="star"&gt;
          &lt;input type="radio" name="rating" value="5" class="star"&gt;
      &lt;/div&gt;
  
      rating = &lt;%= request.getAttribute("Result") %&gt;
  </code></pre>
  
  <p>i'm getting the value from a servlet...</p>
  
  <p>i found a hint on a website </p>
  
  <p>$().rating('select', index / value)
  Use this method to set the value (and display) of the star rating control via javascript. It accepts the index of the star you want to select (0 based) or its value (which must be passed as a string.</p>
  
  <ul>
  <li>See more at: <a href="http://www.fyneworks.com/jquery/star-rating/#tab-Testing" rel="nofollow">http://www.fyneworks.com/jquery/star-rating/#tab-Testing</a></li>
  </ul>
  
  <p>but i'm really bad in Javascript... I dunno how to do this..</p>
  
  <p>Can anyone help ?!</p>