Fórum
Build createAccountURL (to register) with parameters
Moisés Belda, modificado 9 Anos atrás.
Build createAccountURL (to register) with parameters
Junior Member Postagens: 75 Data de Entrada: 20/04/13 Postagens Recentes
Hi
I want to build a custom createAccountURL that I can pass parameters to default filled fields.
I have created url :
Next I have redirect to this URL:
Than I have overwrited create_account.jsp (with a hook)
All parameters are null and has not values....
What's the problem?
I want to build a custom createAccountURL that I can pass parameters to default filled fields.
I have created url :
String createAccountURL = PortalUtil.getCreateAccountURL(request, themeDisplay);
createAccountURL = HttpUtil.setParameter(createAccountURL, "firstName", firstName);
createAccountURL = HttpUtil.setParameter(createAccountURL,"lastName", lastName);
createAccountURL = HttpUtil.setParameter(createAccountURL, "screenName", screenName);
Next I have redirect to this URL:
response.sendRedirect(createAccountURL);
Than I have overwrited create_account.jsp (with a hook)
System.out.println("firstName=> " + ParamUtil.getString(request,"firstName"));
System.out.println("lastName=> " + ParamUtil.getString(request,"lastName"));
System.out.println("screenName=> " + ParamUtil.getString(request,"screenName"));
All parameters are null and has not values....
What's the problem?
Moisés Belda, modificado 9 Anos atrás.
RE: Build createAccountURL (to register) with parameters
Junior Member Postagens: 75 Data de Entrada: 20/04/13 Postagens Recentes
Solved !
Forward is the solution! Not sendRedirect!
request.getRequestDispatcher(createAccountURL).forward(request, response);
return;
Forward is the solution! Not sendRedirect!