title: In Spring MVC custom JSP tag: "Cannot find symbol": pageContext
body: <p>Why would the <code>pageContext</code> variable not be findable in this custom tag installed in the <code>WEB-INF/tags</code> directory of a Spring MVC app?</p>
  
  <pre><code>&lt;%@ tag import="com.ocpsoft.pretty.time.PrettyTime, java.util.Date"%&gt;
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt;
  &lt;%@ attribute name="dateParam" required="true" type="java.util.Date" %&gt;
  
  &lt;%
   PrettyTime p = new PrettyTime();
   String prettyDate = p.format(dateParam);
   pageContext.setAttribute("prettyDate", prettyDate);
  %&gt;
  &lt;c:out value="${prettyDate}"/&gt;
  </code></pre>
  
  <p>The error is:</p>
  
  <pre><code>cannot find symbol
  [javac] symbol  : variable pageContext
  </code></pre>
  
  <p>I thought this was an implicit variable that should be available by default.</p>