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

Redirect from a Apache Sling Servlet

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.
Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
October 16, 2015

2 replies

Lokesh_Shivalingaiah
Lokesh_ShivalingaiahAccepted solution
Level 10
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 {
Translate