掲示板

send parameter from action method to JSP in liferay 7.0

7年前 に fernando tapia によって更新されました。

send parameter from action method to JSP in liferay 7.0

New Member 投稿: 4 参加年月日: 16/09/13 最新の投稿
Hi, i've been trying to send a String object from my controller class to JSP but i can't get it to work.

Here is my codein the action method:

actionResponse.setRenderParameter("idArchivoGuardado", idArchivo);


then, in the render method:

String idArchivoGuardado = (String)renderRequest.getParameter("idArchivoGuardado");
		renderRequest.setAttribute("idArGuardado", idArchivoGuardado);


and in my jsp:

String idArchivoGuardado = "";
if(renderRequest.getAttribute("idArGuardado") != null){
idArchivoGuardado = (String)renderRequest.getAttribute("idArGuardado");
System.out.println(idArchivoGuardado);
}



Can someone explain me how to do that in liferay 7.0?