Am a new bie with liferay and facing some issues with passing values back and forth.

I have a method "public void getNextComments(ActionRequest actionRequest, ActionResponse actionResponse)". I want to send an ArrayList from the MVCPortlet (liferay) to jsp. How can i retrieve it from the jsp end?

I tried setting up object as attribute but not sure how to retrieve the same on the UI.

Am a new bie with liferay and facing some issues with passing values back and forth.

I have a method "public void getNextComments(ActionRequest actionRequest, ActionResponse actionResponse)". I want to send an ArrayList from the MVCPortlet (liferay) to jsp. How can i retrieve it from the jsp end?

I tried setting up object as attribute but not sure how to retrieve the same on the UI.

you just need to do two thingsfirst: with your actionRequest setAttrribute wat object you want to send with attribute name in double quotesecond: with your actionResponse redirect where you want to use that object

Hello, I am having the same problem and i tried everything from above but it doesn't work.The method in my portlet i have:request.setAttribute("subject",subject); response.setRenderParameter("jspPage","/html/display/second.jsp");where subject is a database objectthen in second.jsp i am trying to get subjectSubject subject = (Subject)renderRequest.getAttribute("subject");i tried like this alsoSubject subject=new Subject();subject=(Subject)request.getAttribute("subject");but it always gives me null pointer exceptionbtw in my first jsp i already have set action of the form to corresponding url.