title: Receiving ArrayList from servlet to jsp page
body: <p>I want to receive  ArrayList from Servlet to a JSP page.</p>
  
  <p>Here is what i am doing in Servlet</p>
  
  <p>Stored the arraylist in schoolarraylist</p>
  
  <pre><code>request.setAttribute("Arraylist", schoolarraylist);
  </code></pre>
  
  <p>In JSP(CreateStudent) i am trying to access arraylist</p>
  
  <pre><code>&lt;%ArrayList&lt;SchoolBean&gt; get= ( ArrayList&lt;SchoolBean&gt; )         
  
  &lt;%request.getAttribute("schoolarraylist"); %&gt;
  </code></pre>
  
  <p>What i want to do is load the list of schools from database into a drop down box to be displayed while creating student in this JSP.</p>
  
  <p>This is the code i wrote between the  tag</p>
  
  <pre><code>&lt;%for (SchoolBean c : get) {%&gt;
  
  &lt;option value="&lt;%=c.getSchoolname()%&gt;"&gt; &lt;%=c.getSchoolname()%&gt;
  &lt;/option&gt;
  &lt;%} %&gt;
  </code></pre>