I'm developing a small project using Servlets, Beans and JSP. In the servlet I need to execute a query and populate the Beans with the resultset. Then JSP reads the beans and displays the records. ListBean is bean class. I'm wondering if this is the correct way to populate the beans. If yes, could you please provide me the syntax to read this bean from JSP. Thanks much.
Create Session. Check for the bean object in the session. If no bean object, instantiate and put the bean object in the session. If the bean object is already in the session, call method to populate the bean with result set. in the method, store the result set object into collection. Now you finished filling the bean. Do RequestDispatcher.forward method to forward to jsp. In the jsp use "useBean" construct to retrive the information from the bean.
I hope these steps are clear. If you need more assistence let me know