After performing some validation in a Sling Servlet, I want to redirect to a 'Thank you' page, but it is not working — I can't access the request
object.
We are doing it this way:
RequestDispatcher dispatcher = slingRequest.getRequestDispatcher("/content/project/abc/us/en/homepage.html", options);
dispatcher.forward(wrappedRequest, slingResponse);
We also cannot get the request object in the next page if we use sendRedirect()
instead.
This is fixed now. Thanks guys. We used sessionStorage/localStorage for this.