Question
For this project, we are using JSPs to allow editing and searching for information in a Rolodex.
A first page displays how many people are in the Rolodex, has a search box to input a search string and a button triggering the search, and has a button linking to the page allowing to add a new entry in the Rolodex. The second page displays the list of names that contain the search string, with a button that triggers the editing of the corresponding entry in a third page. A fourth page allows entering a name and a phone number to be added to the Rolodex.
Solution Preview
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.
<%@page import="java.io.File"%><%@page import="java.io.FileWriter"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Adding</title>
</head>
<body>
<h1>Adding</h1>
<!-- submit to its own to add new entry -->
<form action="add.jsp" method="POST">
<table >
<tbody>
<tr>
<td>Name</td>
<td><input type="text" name="name" value="" /></td>
</tr>
<tr>
<td>Phone</td>
<td><input type="text" name="phone" value="" /></td>
</tr>
<tr>
<td><input type="submit" value="Submit" /></td>
<td>...