title: Why are request attributes not propagated from action to render in portlet?
body: <p>I was checking some Portlet tutorial when I came across the following concept :</p>
  
  <blockquote>
    <p>Due to the separated action and rendering model, the action request attributes will not be available in any of the view components that are included in the render phase (JSP, Servlet etc)</p>
  </blockquote>
  
  <p>and the mentioned code was as follows :</p>
  
  <pre><code>public class DateTimePortlet extends GenericPortlet {
  
  public void doView(RenderRequest req, RenderResponse res) throws IOException, PortletException {        
      Object actionAttribute = req.getAttribute("datetime");
      res.getWriter().println("Date Time:" + (actionAttribute != null ? actionAttribute :"Unavailable"));
      res.getWriter().close();
  }
  
  public void processAction(ActionRequest req, ActionResponse res) throws PortletException {
      req.setAttribute("datetime",new Date());
  }        
  }
  </code></pre>
  
  <p>And actually I don't understand why is this happening .... isn't the render method always called after the action method? .... so they run in the same scope?</p>