HP Integrity NonStop J-Series User Manual

Page 74

Advertising
background image

6.

“Modifying the EmpInfo-servlet.xml File” (page 78)

7.

“Modifying the index.jsp File” (page 79)

8.

“Implementing the RMI Service in EmpInfo” (page 80)

Creating JSPs to Delete and Retrieve Employee Details

To delete or retrieve any employee details in the EmpInfo application, you must create and modify
the following files:

retrieveordelete.jsp

retrieveresult.jsp

deleteresult.jsp

1.

Create the files in the EmpInfo/WebContent/WEB-INF/jsp directory, as described in

“Creating the index.jsp File” (page 43)

.

2.

Modify the retrieveordelete.jsp file to retrieve an Employee ID from the JSP page as
follows:

<body>
<h2 align="center">Welcome to the EmpInfo Application</h2>
<br>
<h2>Enter Employee Id</h2>
<form:form method="post" commandName="emprord">
<table width="95%" bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="left" width="20%">Employee Id :</td>
<td><form:input path="empid"/> </td>
</tr>
<tr>
<td align="left" width="20%">Action to Perform (Retrieve/Delete) :</td>
<td><form:input path="rord"/> </td>
</tr>
</table>
<br>
<input type="submit" align="left" value="Retrieve/Delete">
<h4><a href=<c:url value="/"/>> Home page </a></h4>
</form:form>
</body>
</html>

3.

Modify the retrieveresult.jsp file to display the details of an employee record on the
JSP page as follows:

<body>
<table width="95%" bgcolor="f8f8ff" border="0"
cellspacing="0" cellpadding="5">
<tr>
<td align="left" width="20%">Employee Id :</td>
<td><c:out value="${model.empid}"/> </td>
</tr>
<tr>
<td align="left" width="20%">
Employee First Name : </td><td><c:out value="${model.empfn}"/> </td>
</tr>
<tr>
<td align="left" width="20%">
Employee Last Name :</td> <td><c:out value="${model.empln}"/> </td>
</tr>
<tr>
<td align="left" width="20%">
Employee Age : </td><td><c:out value="${model.empage}"/> </td>
</tr>
<tr>
<td align="left" width="20%">
Employee Email Id :</td><td> <c:out value="${model.empemail}"/> </td>
</tr>
</table>

74

Spring Framework

Advertising
This manual is related to the following products: