title: Retrieved value from database. How to set to Action Form and JSP from Action class?
body: <p>I have Checkbox in jsp. I want to set its value based on the value retrieved from database.</p>
  
  <p>I have retrieved the value in action class but i am not able to set this value from action class to jsp page.</p>
  
  <p>I am newbie. Could anyone please tell how to do this.</p>
  
  <p>JSP:</p>
  
  <pre><code>    &lt;html:form action="faxDownloadSettings"&gt;
      &lt;html:hidden property="checkMe"/&gt;
      &lt;input type=checkbox name="pdf" property="checkMe" checked="checked"&gt; &lt;bean:message key="com.console.asPDF"/&gt;
      &lt;console:button name="save" script="save();"&gt;
      &lt;console:label&gt;&lt;bean:message key="com.console.save"/&gt;&lt;/console:label&gt;
      &lt;/console:button&gt;
  </code></pre>
  
  <p>Action form:        </p>
  
  <pre><code>    public class FaxDownloadSettingsForm extends ActionForm {
  
  
      private boolean checkMe;
  
      public void setCheckMe(boolean checkMe){
                      this.checkMe = checkMe;
              }
  
              public boolean getCheckMe(){
                      return checkMe;
              }
      }
  </code></pre>
  
  <p>Action class:        </p>
  
  <pre><code>    public class FaxDownloadSettingsAction extends Action {
  
      public ActionForward execute(ActionMapping mapping,
                              ActionForm actionForm, HttpServletRequest request,
                              HttpServletResponse response)
                                              throws Exception {
  
       FaxDownloadSettingsForm form = (FaxDownloadSettingsForm) actionForm;
  
        boolean isFaxtopdf = enumResponse.getFaxtopdf();
  
        request.setAttribute("checkFax", isFaxtopdf);
  
        form.setCheckMe(true); //It also not works    
  
      }
  
  return mapping.findForward("success");
  
  
      }
  </code></pre>