add.jsp
<html>
<head>
<link rel="stylesheet" href="css/mi.css" type="text/css">
<a href="http://127.0.0.1:4444/me" > <img src="mimes/SAP_me.gif" alt="Home" ></a>
</head>
<body>
<jsp:useBean id="dataBean" scope="session" class="persistenceexample1.bean.TableViewBean" />
<!-- For event handling we need a HTML "form" command -->
<form method="post" action="start" id="form1" name="form2">
<!-- Disply title of the example -->
<h6>Adding a car and/or licence numbers </h6><br>
<table align="left" border="0" class="BoxOut" cellpadding="5" cellspacing="5" width="100%">
<tbody>
<tr class="miBody" >
<td align="right">
car:
</td>
<td>
<!-- The parameter "name" in the JSP has to match the parameter in "request.getParameter("CAR")"
in the servlet -->
<input type="text" name="CAR" size="20">
</td>
</tr>
<tr class="miBody" >
<td align="right">
licence #:
</td>
<td>
<!-- The parameter "name" in the JSP has to match the parameter in "request.getParameter("LICENSE")"
in the servlet -->
<input type="text" name="LICENSE" size="20">
</td>
</tr>
<tr class="miBody" >
<td>
<input type="submit" name="_event_addEntrySubmit" value="Add">
</td>
<td>
<!-- In constants.jave we refer to the event as EVENT_NAME = "name" . The AbstractMEHttpServlet analyses
the string "_event_name" and passes "name" to the "doHandleEvent" method as "eventName" -->
<input type="submit" name="_event_addEntryCancel" value="Cancel">
</td>
</tr>
</tbody>
</table>
</form>
</body>
</html>