Which is the correct way to get a slingRequest from a pageContext object in Tag Handlers. Will it give same result always?
SlingHttpServletRequest slingRequest1 = TagUtil.getRequest(pageContext);
SlingHttpServletRequest slingRequest2 = (SlingHttpServletRequest) pageContext.getRequest();
SlingHttpServletRequest slingRequest3 = (SlingHttpServletRequest)pageContext.getAttribute("slingRequest");
Solved! Go to Solution.
Views
Replies
Total Likes
Feike has a blog that shows this:
TagUtil
// gets the SlingRequest/SlingResponse when you are creating custom tags
PageContext pageContext = (PageContext) getJspContext();
SlingHttpServletRequest slingRequest = TagUtil.getRequest(pageContext);
Views
Replies
Total Likes
Feike has a blog that shows this:
TagUtil
// gets the SlingRequest/SlingResponse when you are creating custom tags
PageContext pageContext = (PageContext) getJspContext();
SlingHttpServletRequest slingRequest = TagUtil.getRequest(pageContext);
Views
Replies
Total Likes
Thanks Scott for the quick response.
Views
Replies
Total Likes
Views
Likes
Replies