arshi9464 -2 Light Poster

i have made a jsp page, in which:-
1) I HAVE CERTAIN TEXT FIELDS
2) AN OK BUTTON
3) A GENERATE BUTTON.

The problem:-
When i click on generate button, info from database should get filled in the textfields.

How can i do this?