title: Switch Statement / Iteration in JSTL using Custom Tags Collection
body: <p><strong>HelloTag.Java</strong> </p>
  
  <pre><code>public class HelloTag extends SimpleTagSupport {
  
  @Override
  public void doTag() throws JspException, IOException {
      JspWriter out = getJspContext().getOut();
  
      ArrayList outerList = new ArrayList();
      ArrayList innerList = null;
      for (int i = 0; i &lt; 5; i++) {
          innerList = new ArrayList();
          innerList.add("1");
          innerList.add("Name");
          outerList.add(innerList);
      }
      for (int i = 0; i &lt; outerList.size(); i++) {
          for (int j = 0; j &lt; innerList.size(); j++) {
              out.println(innerList.get(j));
          }
      }
  }
  }
  </code></pre>
  
  <p><strong>In  JSP File,</strong>
  There is following code snippet:</p>
  
  <pre><code> &lt;body&gt;
      &lt;ct:Hello&gt;&lt;/ct:Hello&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>When I run the JSP file, this file showing the accurate result; but</p>
  
  <p><strong>I want to take the decision of every value that come from custom tag class</strong></p>
  
  <p>such as</p>
  
  <pre><code> &lt;c:set var="name" scope="" value=""/&gt;
   &lt;c:choose&gt;
   &lt;c:when test="${name == 1}"&gt;
    This is Your ID:-
   &lt;/c:when&gt;
   &lt;c:otherwise&gt;
      This is Your Name
   &lt;/c:otherwise&gt;
   &lt;/c:choose&gt;
  </code></pre>
  
  <p>The above code is the just for sake of example. please update me how take decision on each value that comes form custom tag class. </p>
  
  <p>Other way to explain my problem is that, I want to store every value in a variable , and then take a decision about that value just using JSTL without Scriplet Tags focusing on the above scenario (<strong>HelloTag.Java</strong> )</p>