How want you to connect to database:
JDBC, Entity or Hibernate?
Or you can write a REST service to get all data from a table.
If you want to use Entity you can generate a entity from a table using NetBeans or other editor.
Then you can write a bean and than a jsp page.