Request variable in dotcms
Please find my requirement that needs to be done in dotcms-
1) I need to create a Map object for each request开发者_如何学C. 2) Across different widgets or containers i should be able to add data or get data from the Map object.
Can you please provide me a solution or idea to fulfill the requirement.
Thanks in advance
You can use the standard HTTPServletRequest methods, even from velocity:
$request.setAttribute("foo", "bar")
$request.getAttribute("foo") would print "bar"
$request.getParameter("foo") would get a GET or POST parameter "foo" and
#set($map = ${request.getParameterMap()}) would get the whole map.
精彩评论