multi-page template question
I'm totally new to java programming. I have my website with photos i've taken, and i want to get my photos from my gallery to go to a seperate page with info about the photo. Since i plan on having alot of photos there, i was wondering how to make it so i don't have to design a page for each of them, but use java to create a "template page" and then with a java database have the info for each pic go into those pages when clicked.
I don't know if i'm totally off about what i can do with java, but if anyone has any help, i'd appreciate it.
Remember i don't really know much about java, so anywhere i can copy the stuff is good.