Passing parameters in a response.sendRedirect() - JSP

A redirect consists in sending a response to the browser saying "Please go to the following URL : RedirectIfSuccessful.jsp".

When it receives this response, the browser sends a new request to RedirectIfSuccessful.jsp, without any parameter. So getting the parameter name from RedirectIfSuccessful.jsp will return null.

If you want to have access to the name after the redirection, you need to send a redirect to RedirectIfSuccessful.jsp?name=<the name the user entered>