title: Calling a Servlet when loading the index page
body: <p>I need to load a list of some data from a database and show them on my index JSP page. My way of doing that is call a Servlet in the index page like this.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;body&gt;
      &lt;jsp:include page="listAll" /&gt;
      &lt;fieldset&gt;
  
          &lt;legend&gt;Search Here&lt;/legend&gt;
          &lt;input type="text" id="search" name="search"/&gt;
          &lt;input type="button" value="Search" id="searchBtn"/&gt;
  
      &lt;/fieldset&gt;
  
  &lt;/body&gt; 
  </code></pre>
  
  <p>I am going to do my coding in listAll servlet and add an attribute to the request. What I need to know is, Is this way correct? Can I do what I need like that?
  If not, How to do that?</p>