Posted By

arunpjohny on 10/16/07


Tagged

Freemarker


Versions (?)

Getting HTTP Request properties and attributes in freemarker template


 / Published in: Other
 

URL: http://forum.springframework.org/showthread.php?t=32846

The Request and RequestParameters are two Hashes provided by freemarker, it will be available in all templates

  1. /*
  2. *To get access to Request Parameters use one of the following syntaxes where test is the request property
  3. */
  4. ${RequestParameters['test']}
  5. or
  6. ${RequestParameters.test}
  7.  
  8. /*
  9. *to get access to Request Attributes use one of the following where test is the request attribute
  10. */
  11. ${Request['test']}
  12. or
  13. ${Request.test}

Report this snippet  

You need to login to post a comment.