E
E
Evgeny Kolman2017-04-09 18:50:06
Java
Evgeny Kolman, 2017-04-09 18:50:06

How to pass List to JSP page?

Good evening!
Need to pass list to .jsp page to table! The request to the database is valid, checked. If you pass the size of the list through the scriptlet, it says that the list is empty!

Here is the project structure: d6b89f02665d402f8cbb27706f3e78a1.png
Here is the servlet itself: fe7664b8271848adb529fa3fdc4b8d93.png
JSP page: 7b21c40ae8344c0ab6b40a62f0041fc5.png
And here is the output in the browser:6ddf3ca54253447e8a02d46349007916.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kosarev, 2017-04-10
@jaxtr

You have a typo in your code: in <td> you need to refer to the list element - studentList, not list, for example: ${studentList.first_name}. Well, place <td> inside <tr>.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question