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)
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 SlingHttpServletRequestrequest to get the RequestResponseFactory, how can that be done? i cant find any method in SlingHttpServletRequest that return the RequestResponseFactory
And just as a general statement: AEM making requests to itself is in general considered a code smell. There should always be a direct way (using API) to achieve the same.
(And it case it is not, there should be one... please raise a feature request for it.)