title: How to access a request attribute set by a servlet in JSP?
body: <p>I'm trying to retrieve attribute values set by a servlet in a JSP page, but I've only luck with parameters by <code>${param}</code>. I'm not sure about what can I do different. Maybe its simple, but I couldn't manage it yet.</p>
  
  <pre><code>public void execute(HttpServletRequest request, HttpServletResponse response) {
  
      //there's no "setParameter" method for the "request" object
      request.setAttribute("attrib", "attribValue");
  
      RequestDispatcher rd = request.getRequestDispatcher("/Test.jsp");
      rd.forward(request,response);
  }
  </code></pre>
  
  <p>In the JSP I have been trying to retrieve the "attribValue", but without success:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;body&gt;
      &lt;!-- Is there another tag instead of "param"??? --&gt;
      &lt;p&gt;Test attribute value: ${param.attrib}
  &lt;/body&gt;
  </code></pre>
  
  <p>If I pass a parameter through all the process (invoking page, servlets and destination page), it works quite good.</p>