add-student.html page in the
Web Pages folder is where we need to add the form that allows the user to enter the details for a student.
Add the following HTML to the
<h1>Add New Student</h1>
<form action="add-student" method="POST">
<label>ID:</label><input type="text" name="id"/>
<label>Name:</label><input type="text" name="name"/>
<button type="submit">Add Student</button>
<a class="nav" href="index.html">Back to Menu</a>
This contains a title heading and a form for the student's details. We are also adding a navigation link to the bottom of the page so that the user can get back to the menu.
Build and redeploy the application by copying the WAR file into the webapps folder again, replacing the original file.
Click the 'Add New Student' link in the index/menu page to view the form. It will look pretty ugly at the moment, but it should have all of the components to allow a user to enter the details for a student.