Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はjspとサーブレットが初めてです。可変数パラメータを検索した後、データベースからのレコードのリストをjspページに表示する必要があります。サーブレットで listRecords メソッドを作成しました。助けてください
レコードのリスト (ArrayList) を作成し、それを jsp ページに渡します (要求パラメーターまたはセッションのいずれかによって)。
次に、jstl を使用してリスト内の各要素を表示します。サンプルは次のとおりです。
<table> <c:forEach var="ele" items="${list}"> <tr> <td>${ele.name}</td> <td>${ele.value}</td> </tr> </c:forEach> </table>