I need to display one image per day from an array depending upon the day in jsp/servlet.
Intially i am having 5 images in an array.
Then i want to display
sunday --- 1st image
monday--- 2nd image
tuesday -- 3rd image
thursday -- 5th image
friday -- 1st image
Saturday-- 2nd image
number of images is dynamically changing.
if the array has one image.. daily that one image should display.
if the array has two image, then 1st day--- 1st image. 2nd day--- 2nd image, 3rd day--- again 1st image.
Can any one please tell me the logic to do this? waiting for your reply.