title: JSP c:import parameter in code scope
body: <p>I feel like this is a trivial question, but for some reason I can't solve it.
  I want to access a c:import param as a variable in the 'code' of my JSP rather than as an EL expression </p>
  
  <p>From the following JSP:</p>
  
  <pre><code>&lt;%@ page pageEncoding="UTF-8"%&gt;
  &lt;%@ page language="java"%&gt;
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  
                  &lt;c:import url="child.jsp"&gt;
                      &lt;c:param name="foo" value="bar"/&gt;
                  &lt;/c:import&gt;
  </code></pre>
  
  <p>To the imported JSP:</p>
  
  <pre><code>&lt;%@ page pageEncoding="UTF-8"%&gt;
  &lt;%@ page language="java"%&gt;
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;%
  
  if( null == request.getAttribute("foo")  )
     throw new Exception();
  
  %&gt;
  </code></pre>
  
  <p>Always throws an Exception, in other words, this is not the correct way to access the parameter.</p>
  
  <p>Please tell me how this should be done?</p>