title: How to get a request object in Freemarker
body: <p>In Velocity template engine I could just use a model variable</p>
  
  <pre><code>$request
  </code></pre>
  
  <p>which is a instance of HttpServletRequest. How to get a http request object in Freemarker template engine? According to the freemarker documentation, </p>
  
  <p><a href="http://freemarker.org/docs/api/freemarker/ext/servlet/HttpRequestHashModel.html#getRequest--" rel="nofollow noreferrer">http://freemarker.org/docs/api/freemarker/ext/servlet/HttpRequestHashModel.html#getRequest--</a></p>
  
  <p>there is a class HttpRequestHashModel and its method returns a instance of HttpServletRequest.</p>
  
  <p>So the question is, how to access this object in spring boot? I found some information about using a </p>
  
  <pre><code>${Request}
  </code></pre>
  
  <p>variable, but I got an error that it returns a null/missing object. </p>