adaptive form || response.sendRedirect(...) not working | Community
Skip to main content
Level 3
October 16, 2015
Solved

adaptive form || response.sendRedirect(...) not working

  • October 16, 2015
  • 3 replies
  • 2722 views

I have a login form which is an adaptive form which has two field for user to submit his username & password.

I process the form values and authenticate against a custom database. All this well but response.sendRedirect("...") doesn't redirect ot the next page. I tried hard coding to redirect to this --  response.sendRedirect("http://www.google.com.au");   Still no luck.

Is there a different way to do it in an adaptive form ? I want to redirect user to the 'referer'

/Kanwal

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 WhoaShekhar

Hi there,

Thanks for reaching out to Adobe Community.

See if these docs help:

https://helpx.adobe.com/experience-manager/using/posting-aem-6-form-data.html

https://helpx.adobe.com/experience-manager/using/custom-sling-servlets.html

Thanks!

3 replies

WhoaShekhar
WhoaShekharAccepted solution
Level 10
October 16, 2015
KanwaljitAuthor
Level 3
October 16, 2015

Hello Shekar,

I have reviewed the links that you provided. Thanks.

My scenario is... I submit an adaptive form to an end point (which is a slingservlet implementation). I am reaching till in this slingservlet fine smiley.

Now, based on business logic, I need to decide on which page should the this sling servlet "redirect" to. This is what is failing sad Here when I do  response.sendRedirect(...), it doesn't seem to do anything

/Regards
Kanwal

KanwaljitAuthor
Level 3
October 16, 2015

Ok. When I try to do sendRedirect(..) to a 'local' url, it works fine. So, I guess, issue is resolved

January 27, 2024

Hi @kanwaljit ,

I'm facing similar issue . I can see the redirection in network tab but browser address bar is not changing .

I'm trying to redirect to local address only.