开发者

Request variable in dotcms

开发者 https://www.devze.com 2023-03-13 20:52 出处:网络
Please find my requirement that needs to be done in dotcms- 1) I need to create a Map object for each request开发者_如何学C.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消