Do you want to display first 4 elements or 4 selected elements. If its the former then you can use the length property with the logic:iterate tag to achieve that...
But i just wana confirm dat isnt it possible in logic iterate as in JSP/servlet , we just request.getAttribute that arrayList and do Something like dis