title: Custom tag - get access to data in model?
body: <p>I am creating a custom JSP tag by extending SimpleTagSupport.  Normally in the view, I could do something like <code>&lt;c:out value="${key.attr}" /&gt;</code> using jstl to pull data from the model.  My question is: when creating custom tags (by using SimpleTagSupport), how do I gain access to the data from the model?  Thanks.</p>
  
  <p>Just to clarify, I need a custom tag to do some formatting on a piece of data in the model.  I am open to suggestions if a custom tag is not the best approach for this (but would still love an answer to my original question). </p>
  
  <p><strong>Update</strong>: based on Bozhos answers it appears that I can grab the data from the model by using the JSP context.  Is this the typical way it is usually done (i.e. when a custom tag is used to manipulate a peice of data in the model before display)?  Or is it okay to pass the data as a parameter to the custom tag logic (i.e. via the tag attributes)?  I'm just trying to figure out the pros and cons of each method.  Thanks.</p>