In this EJB-JPA Tutorial, we will create the Html form to learn the JPA (Create, Read, Update, Delete) CRUD actions.
Create Account Form
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <!-- Sample 4.01: Create Form for Account Creation --> <h1>Savings Account Creation Form</h1> <FORM action="http://localhost:8080/EJBWeb/CreateAccountServlet"> Enter Your Name: <br> <input name="person_name" type="text" size="25" value=""><br> Initial Amount: <br> <Input name="balance" type="text" size="5" value=""><br> <input name="NewAc" type="submit" value="Submit"><br> </FORM> <h3> <a href="http://localhost:8080/EJBWeb/SavingsAcHomePage.html">Home</a> </h3> </body> </html> |
Account Transaction Form
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <!-- Sample 4.02: Create Form Account Transaction --> <FORM action="AcTransactions"> <h1>Saving A.c Transactions</h1> Account ID: <br> <input name="pid" type="text" size="3" value=""><br> Amount: <br> <Input name="amount" type="text" size="5" value=""><br> <input name="transaction" type="submit" value="Withdraw"> <input name="transaction" type="submit" value="Deposit"><br> </FORM> <h3> <a href="http://localhost:8080/EJBWeb/SavingsAcHomePage.html"> Home</a> </h3> </body> </html> |
Close Account Form
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <!-- Sample 4.03: Form to Close the Account --> <h2>Close Saving Account</h2> <FORM action="http://localhost:8080/EJBWeb/CloseAcServlet"> Account ID: <br> <Input name="pid" type="text" size="5" value=""><br> <input name="closeAc" type="submit" value="submit"><br> </FORM> <h3><a href="http://localhost:8080/EJBWeb/SavingsAcHomePage.html"> Home</a> </h3> </body> </html> |
Home Page
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
<!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <!-- Sample 4.04: Create Form for Account Creation --> <h2> <span style="color: #0000ff;">With This JPA-Entity Example you can perform the Follow Operations:</span> </h2> <table style="border-collapse: collapse; width: 100%; height: 159px;" border="0"> <tbody> <tr style="height: 53px;"> <td style="width: 50%; text-align: center; height: 53px;" colspan="2"> <h3 style="text-align: center;"> <a href="http://localhost:8080/EJBWeb/CreateAccount.html"> Create Savings Ac</a></h3> </td> </tr> <tr style="height: 53px;"> <td style="width: 50%; height: 53px;"> <h3 style="text-align: center;"> <a href="http://localhost:8080/EJBWeb/TransactAc.html"> Deposit</a></h3> </td> <td style="width: 50%; height: 53px;"> <h3 style="text-align: center;"> <a href="http://localhost:8080/EJBWeb/TransactAc.html"> Withdraw</a></h3> </td> </tr> <tr style="height: 53px;"> <td style="width: 50%; text-align: center; height: 53px;" colspan="2"> <h3 style="text-align: center;"> <a href="http://localhost:8080/EJBWeb/CloseAc.html"> Delete Savings Account</a></h3> </td> </tr> </tbody> </table> </body> </html> |
Categories: JavaEE-EJB-Tube