> On 03/28/2010 11:19 AM, sc3sc3 . wrote:
>> hi
>> i have directory with images im my war file:
>> /war/images
>> how can i iterate over the contents of this directory
>> when my application starts
>> i have to build: List<String> imageNames
>> thanks for your time
>> sc3*2
>
> Can you define the images using a client bundle? See
> http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html
if i understand it right
using the above i have to manually define all the images
i would prefer reading the content of the directory 'on the fly'
there can be a lot of images
thanks
public String[] getImageNames() {
return new File('images').list();
}
Obviously, you would want to throw in some error checking and such.
HTH,
Chad