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="persistenceexample3.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 -->
 <h4>Adding a car and/or licence numbers </h4><br>
    
 <table align="left" border="0" class="BoxOut" cellpadding="5" cellspacing="5" width="100%">
  <tbody>
    <tr class="miBody" >
      <td align="right">
        make:

      </td>
      <td>
<!-- The parameter "name" in the JSP has to match the parameter in "request.getParameter("MAKE")"
     in the servlet -->
        <input type="text" name="MAKE" size="20">
      </td>
    </tr>
    <tr class="miBody" >
      <td align="right">
        model:

      </td>
      <td>
<!-- The parameter "name" in the JSP has to match the parameter in "request.getParameter("MODEL")"
     in the servlet -->
        <input type="text" name="MODEL" size="20">
      </td>
    </tr>
    <tr class="miBody" >
      <td align="right">
        engine type:

      </td>
      <td>
<!-- The parameter "name" in the JSP has to match the parameter in "request.getParameter("ENGINE")"
     in the servlet -->
        <select name="ENGINE" >
            <option>Gasoline</option>
            <option>Diesel</option>
            <option>Hydrogen</option>
            <option>Electric/Hybrid</option>
           </select>
      </td>
    </tr>
    <tr class="miBody" >
      <td align="right">
        cylinders:

      </td>
      <td>
<!-- The parameter "name" in the JSP has to match the parameter in "request.getParameter("CYLINDERS")"
     in the servlet -->
        <select name="CYLINDERS" >
            <option>4</option>
            <option>3</option>
            <option>5</option>
            <option>6</option>
            <option>8</option>
            <option>10</option>
            <option>12</option>
           </select>
      </td>
    </tr>
    <tr class="miBody" >
      <td align="right">
        valves/cylinder:

      </td>
      <td>
<!-- The parameter "name" in the JSP has to match the parameter in "request.getParameter("VALVES")"
     in the servlet -->
        <select name="VALVES" >
            <option>2</option>
            <option>3</option>
            <option>4</option>
           </select>
      </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 align="center" >
        <input type="submit" name="_event_addEntrySubmit" value="  Add  ">
      </td>
      <td align="center" >
<!-- 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>