Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Level 10
4 Replies

Avatar

Correct answer by
Level 10

Avatar

Level 4

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

Avatar

Level 4

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

Avatar

Level 1

Hi @Kanwaljit ,

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

vkp1239_0-1706364257290.png

I'm trying to redirect to local address only.