Solved! Go to Solution.
Views
Replies
Total Likes
Check https://sling.apache.org/documentation/bundles/servlet-helpers.html, it explains the tools Sling provides for this.
Hi @kjj ,
Yes, the com.day.cq.contentsync.handler.util.RequestResponseFactory
class is deprecated in AEM. The recommended substitute for this class is to use the org.apache.sling.api.request.RequestResponseFactory
interface instead. To obtain an instance of the RequestResponseFactory
interface, you can use the org.apache.sling.api.SlingHttpServletRequest
object.
Hey @MayurSatav can you just recheck or tell me how you found the api, i cannot find it, giving a snap from IDE, share me also the java-doc link for the same (org.apache.sling.api.request.RequestResponseFactor)
@Jörg_Hoh could you please help this user?
Views
Replies
Total Likes
Hi @MayurSatav
Such an
org.apache.sling.api.request.RequestResponseFactory
interface does not exist. Can you please confirm the right replacement?
Hi @kjj
What is the reason you are using "RequestResponseFactory" API, I suggest if it is just to create request , you can get it directly from SlingHttpServletRequest.
Let me know if you have any other specific reason?
my reason for using it is to get the generated html for my component,
the above person Mayur say use SlingHttpServletRequest request to get the RequestResponseFactory, how can that be done? i cant find any method in SlingHttpServletRequest that return the RequestResponseFactory
Check https://sling.apache.org/documentation/bundles/servlet-helpers.html, it explains the tools Sling provides for this.