Current location - Recipe Complete Network - Complete cookbook - How to read the data in the drop-down menu from the database?
How to read the data in the drop-down menu from the database?
First of all, you should get the contents of the German-Austrian database from the background, and then forward it to the jsp page, and read the contents from the background through jstl or el.

The background can put the data of database query into an array or collection, and then use request. getRequestDispatcher。 Forward () transfers the data or collection to the drop-down menu page in the foreground, and then uses < select & gt& ltc:foreach & gt;; & lt option value =' xxx'> Traverse the contents of the background data or collection.

The background is easy to realize. As for the front page, if you don't know jstl and el, you can check the corresponding usage online. If you look carefully, you can master the basics in 2 hours.