Redirect from a Apache Sling Servlet | Community
Skip to main content
ramanareddy438
New Participant
October 16, 2015
Solved

Redirect from a Apache Sling Servlet

  • October 16, 2015
  • 2 replies
  • 1825 views

Hi All,

I have a servlet with URL /bin/redirectServlet. In this servlet I just want to redirect from to some other page using RequestDispatcher.

 

RequestDispatcher rd = request.getRequestDispatcher("/content/<app_name>/<page>/<sub_page>.html"); //here request is SlingHttpServletRequest since it is a sling servlet. try { rd.forward(request, response);

But it is not doing anything for me. Please help me out.

This is a simple page redirect.

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Lokesh_Shivalingaiah

Hi Ramana

Hope this helps http://aem-cq-tutorials.blogspot.in/2014/06/mapping-of-request-urls-in-cqaem.html

2 replies

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
New Participant
October 16, 2015
New Participant
October 16, 2015
RequestDispatcher rd = request.getRequestDispatcher("/content/<app_name>/<page>/<sub_page>.html"); //here request is SlingHttpServletRequest since it is a sling servlet. try {