How can I select 2 random images from 20 in JSP?
Posted on 2003-11-21
i need to be able to select 2 images at random from approx 20 images and display them on a page.
at this point i am assuming that the simplest route will be to have the image filenames in an array and then pick 2 of them to display. any better solutions will be appreciated but i have no database access.
i will need to know how to set up the array and then select two at random and write the selected values to the HTML.
if someone could please help with some code that will sort this out for me i would be a happy bunny.