When the JSP+Servlet page loads, it requests the database, obtains the information and displays it on the page. How to deal with it? Ask for advice!
Brother, I want to say that your understanding is wrong. If you want to display database data on a jsp page, you usually use a servlet to retrieve the data, set the retrieved data in a request, and then request that it be forwarded to the jsp page. Jsp pages can get data through el expressions. You should remember this process. Instead of what you said, when you enter the page, you immediately ask for data. You don't need to enter the page to request data, just take out the data before entering the page. It is very important to understand this process, and it is also very helpful for future framework learning. In addition to this process, there is an opposite process, which is to input data from the page and then insert it into the database. This process is completely opposite to the above process, that is, the jsp page of data input is thought out, and the form is submitted to a specific servlet after the input is completed, and the servlet performs a specific insertion operation.