J
J
Jake Taylor2021-07-10 15:54:56
Java
Jake Taylor, 2021-07-10 15:54:56

How to display all ENUM values ​​from the database on a JSP\HTML page?

`Java 8` is used. There is an `MVC` model and one `servlet` that handles all requests.
The question arose, how to display on the `JSP\HTML` page all the values ​​from the database from a certain table, a field that has the `ENUM` type, so as not to prescribe on the page hardcore like this:

spoiler


Select country
RUS
BLR
POL
UKR
DEU
CHN

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BorLaze, 2021-07-10
@BorLaze

For postgres you can get all values ​​like this .
Further - business of technology (to push all values ​​from in ).
If the DB is some other, google "DB get enum values"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question