Created
August 13, 2019 00:37
-
-
Save darbyluv2code/cb002390875d63c12bba9100dbc0cfee to your computer and use it in GitHub Desktop.
list students with scriptlets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@ page import="java.util.*, com.luv2code.web.jdbc.*" %> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Student Tracker App</title> | |
| <link type="text/css" rel="stylesheet" href="css/style.css"> | |
| </head> | |
| <% | |
| // get the students from the request object (sent by servlet) | |
| List<Student> theStudents = | |
| (List<Student>) request.getAttribute("STUDENT_LIST"); | |
| %> | |
| <body> | |
| <div id="wrapper"> | |
| <div id="header"> | |
| <h2>FooBar University</h2> | |
| </div> | |
| </div> | |
| <div id="container"> | |
| <div id="content"> | |
| <table> | |
| <tr> | |
| <th>First Name</th> | |
| <th>Last Name</th> | |
| <th>Email</th> | |
| </tr> | |
| <% for (Student tempStudent : theStudents) { %> | |
| <tr> | |
| <td> <%= tempStudent.getFirstName() %> </td> | |
| <td> <%= tempStudent.getLastName() %> </td> | |
| <td> <%= tempStudent.getEmail() %> </td> | |
| </tr> | |
| <% } %> | |
| </table> | |
| </div> | |
| </div> | |
| </body> | |
| </html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment