title: JSP Custom tag enforce Collection type
body: <p>I am creating a custom <code>JSP</code> tag. I am including a <code>java.util.Collection</code> as an attribute like so:</p>
  
  <pre><code>&lt;%@ attribute name="elements" type="java.util.Collection" required="true" %&gt;
  </code></pre>
  
  <p>My question is, is there a way to enforce what the type of the Collection is?</p>
  
  <p>So suppose I have an interface called <code>JSPSelect</code>, I would want to do something like this</p>
  
  <pre><code>&lt;%@ attribute name="elements" type="java.util.Collection&lt;JSPSelect&gt;" required="true" %&gt;
  </code></pre>
  
  <p>Is this possible?</p>
  
  <p>If I attempt to do the above, it creates an unknown tag error.</p>
  
  <p>Thanks</p>