title: c:forEach not working
body: <p>I have a problem with a taglib method c:forEach. I want to get a List of languages from a servlet class and show it on a jsp page with c:forEach. But it is just showing nothing^^ an empty select tag.</p>
  
  <p>The for each loop in the jsp file (i have taglib import and already tried without c:out):</p>
  
  <pre><code>...
  &lt;%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  ...
  &lt;c:forEach var="lang" items="${registrationServlet.inputLangs}"&gt;
    &lt;option&gt;&lt;c:out value="${lang}"&gt;&lt;/c:out&gt;&lt;/option&gt;
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>My Servlet Class (it is a servlet because I have to do some form submitting stuff with it too):</p>
  
  <pre><code>...
  // List of languages to choose from
  List&lt;String&gt; inputLangs;
  ...
  // Query the languages from the database
  public List&lt;String&gt; getInputLangs() {
      try {
          String query = "SELECT DISTINCT Lang FROM country";
          ResultSet result = DbConnection.read(query);
          while (result.next()) {
              inputLangs.add(result.getString("lang"));
          }
      } catch (SQLException e) {
          System.err.println("Couldn't get languages from DB.");
      }
      return inputLangs;
  }
  </code></pre>
  
  <p>What am I doing wrong?^^</p>
  
  <p>BTW. it works with pure java:</p>
  
  <pre><code>&lt;%
  RegistrationServlet reg = new RegistrationServlet();
  for (String lang : reg.getInputLangs()) {
  %&gt;
    &lt;option&gt;&lt;%=lang%&gt;&lt;/option&gt;
  &lt;%
  }
  %&gt;
  </code></pre>
  
  <p>But as far as I know that's a no go in jsp files ;)</p>