I need to get and set some values in cookie inside the slingModel. I am currently adapting this to SlingHttpServletRequest. Is there any way to inject SlingHttpServletResponse inside the current slingModel.
Views
Replies
Total Likes
Views
Replies
Total Likes
See Praveen code in the thread that Kautuk pointed you to.
Views
Replies
Total Likes
In that code snippet they are using only SlingHttpServletRequest object and is adapted to the SlingHttpServletRequest class.
In my case I need to use both SlingHttpServletRequest and SlingHttpResponse object.
For getting cookie value I'll use the below code
request.setCookie() [SlingHttpServletRequest]
For setting cookie I need to use the below code
response.setCookie() [SlingHttpResponse]
My question is how can I get both the objects in the same slingModel
Views
Replies
Total Likes