title: JSP Spring MVC Populating Form Fields Based on Value in Another Field
body: <p>I have a Spring MVC Form that I am building in a JSP, which will require entering an account number in a field. When I enter that number, I want to run a query to the database to pull back related information for that specific number. This data will then populate other fields on the form.</p>
  
  <p>This is my Spring bind code in the JSP for the account number that will be entered. So, as soon as I enter this number, a DB query should trigger, to bring back the data for the other fields.</p>
  
  <pre><code>&lt;spring:bind path="strExpenseAcctNum"&gt;
      &lt;div class="form-group ${status.error ? 'has-error' : ''}"&gt;
          &lt;label class="col-sm-2 control-label"&gt;Expense Account Number :&lt;/label&gt;
          &lt;div class="col-sm-10"&gt;
              &lt;form:input path="strExpenseAcctNum" type="string" class="form-control " id="strExpenseAcctNum" placeholder="strExpenseAcctNum" /&gt;
              &lt;form:errors path="strExpenseAcctNum" class="control-label" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/spring:bind&gt;
  </code></pre>
  
  <p>From my research, I am thinking a combination of Javascript and JQuery might be the best approach, but being new at this, I am not sure how to configure it.</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks,</p>
  
  <p>Dave</p>