Fórumok
Build createAccountURL (to register) with parameters
Moisés Belda, módosítva 9 év-val korábban
Build createAccountURL (to register) with parameters
Junior Member Bejegyzések: 75 Csatlakozás dátuma: 2013.04.20. Legújabb bejegyzések
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, módosítva 9 év-val korábban
RE: Build createAccountURL (to register) with parameters
Junior Member Bejegyzések: 75 Csatlakozás dátuma: 2013.04.20. Legújabb bejegyzések
Solved !
Forward is the solution! Not sendRedirect!
request.getRequestDispatcher(createAccountURL).forward(request, response);
return;
Forward is the solution! Not sendRedirect!