title: how to pass message from servlet to bootstrap modal
body: <p>Following is the servlet Part where I am getting the value of result. So I need to show this result in modal, please help in this case as I am new to this.</p>
  
  <pre><code>protected void doPost(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
  
          Services service = new Services();
  
          String dsid = request.getParameter("dsid");
          String name = request.getParameter("name");
          String superadmin = request.getParameter("gridRadios");
          Boolean admin = null;
          if (superadmin.equalsIgnoreCase("Yes")) {
              admin = true;
          } else {
              admin = false;
          }
          String region = request.getParameter("region");
  
          String result = service.addAssociate(dsid, name, admin, region);
  
          // System.out.println("Result: " + result);
          response.getWriter().write(result);
  
  
  
      //I need to show value of 'result' in bootstrap modal
  
  
      }
  
  }
  </code></pre>
  
  <p>This is my modal where I wanted to show value of result:</p>
  
  <pre><code>&lt;div class="modal fade" id="success_msg" role="dialog" tabindex="-1"&gt;
  &lt;div class="success"&gt;
    &lt;div class="modal-dialog-success"&gt;
      &lt;div class="col-xs-12 pade_none"&gt;
        &lt;button type="button" class="close" onClick="closeConfirm();" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
        &lt;div class="col-xs-12 pade_none"&gt;
             &lt;p&gt;Message to be shown over here&lt;/p&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-12 pad_none"&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>