title: Open Bootstrap Modal in a Servlet
body: <p>This is what I currently have now:</p>
  
  <pre><code>&lt;a href="../../modal/add-training-program.jsp" class="btn btn-primary" data-toggle="modal" data-target="#modal" data-keyboard="false"&gt;
              &lt;span class="glyphicon glyphicon-plus-sign"&gt;&lt;/span&gt;
              Add&lt;/a&gt;
  </code></pre>
  
  <p>This opens up a bootstrap modal with the form for adding a training program.
  I'd like to reuse this for editing a training program but I want the form fields to be initialized with their value in the database.</p>
  
  <p>Is there a way to call the servlet first (to do the processing of the records from the database), and that servlet will be the one to load the modal?</p>
  
  <p>If it's not possible, can you recommend a way to achieve this?</p>