How does struts2 use jdbc to read every row of the database and access it in jsp pages? I may have missed some steps and have not been successful.

  mysql, question

I have just learned struts2 and am making a simple page for book exhibition. The questions are as follows:
1. There is a table book in the database, which has four fields: id,name,price,count, and several records.
2. I set up a index.jsp page for login (it has been successful) and jump to userindex.jsp through struts.xml after login.
3. I set up an action called, used to read all book information (database access), and built a list with methods of get and set.
4.userindex.jsp’s page reads as follows:

<s:iterator value="list" status="st">
 <td><s:property value="id"/></td>
 <td><s:property value="name"/></td>
 <td><s:property value="price"/></td>
 <td><s:property value="count"/></td>

Now userindex.jsp has nothing
The problem now is that I have just learned struts2 and know that action is needed to handle logic. However, how to combine BookInfoAction with userindex.jsp, I have already implemented the login function, which is to configure struts.xml

<action name="login" class="shopping.LoginAction" method="login">
 <result name="loginout">helloworld.jsp</result>
 <result name="loginin" type="redirect">userindex.jsp</result>

But how can I combine this page showing books with my action? How can I display all the books directly on the page (userindex.jsp) after logging in successfully?

I must have left behind some steps. I know this too, but I searched the materials and read the tutorial without mentioning it. I hope everyone can help me, thank you!

< resultname = "loginit" type = "redirect" > this place is the action name to redirect < /result >