Hi Keng, I think that you want to load data from database and display it. I had done in the following fashion. After a user logs in and is directed to another page(that would show the data from the database) an intermiedate action class is called. This class loads all info from the DB and then displays the relavant page. Here is a part of the struts-config.xml that would give you an idea.
Thank.... i will try it because i new in struts not sure about it.... got any simple way or can explain the code... thank you very much
Joined: May 15, 2006
Let me try to be a little elaborate.
login.jsp- You log in and you should be directed to the display.jsp if the login is correct. It is plain jsp. display.jsp- Requires to prepopulate the drop down box(combo) from the DB. DisplayForm.java - Action Form of display.jsp. DisplayAction.java -Action Class of display.jsp InitCreateForm.java- In between Form class that would do the pre-population. InitCreateAction.java- In between action class that would forward to the dispaly.jsp page.