velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sara Frongillo" <>
Subject load array vtl
Date Tue, 14 Oct 2003 11:59:18 GMT

I have a problem to load a ArrayList in velocity template, in Velocity Servlet I have:

          ArrayList images = new ArrayList();
          ArrayList audios = new ArrayList();
          ArrayList videos = new ArrayList();

          context.put("images", images);
          context.put("audios", audios);
          context.put("videos", videos);

and into Template I use them as follow:

   #foreach($item in $info) 

but add() method add only 1 object and no more (if there are).

Will appreciate if someone can help or suggest me a method for load a array in VTL

Sara Frongillo
Software Area

I.T.Sys srl Garibaldi, 215
84125 Salerno - Italy

Office +390892580977

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message