Enabling empinfo to delete and retrieve – HP Integrity NonStop J-Series User Manual

Page 116

Advertising
background image

Figure 34 EmpInfo: Message Screen

Enabling EmpInfo to Delete and Retrieve Employee Details

This section describes the following activities:

1.

“Creating JSPs to Delete and Retrieve Employee Details” (page 116)

2.

“Creating the RowMapper Class” (page 118)

3.

“Modifying the EmployeeDao.java Class File” (page 119)

4.

“Modifying the Employee.java File” (page 119)

5.

“Modifying the EmployeeController.java File” (page 120)

6.

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

7.

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

8.

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

Creating JSPs to Delete and Retrieve Employee Details

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

retrieveordelete.jsp

retrieveresult.jsp

deleteresult.jsp

To create these JSP files, complete the following steps:
1.

Create the retrieveordelete.jsp file in the EmpInfo/WebContent/WEB-INF/jsp
directory, as described in

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

.

2.

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

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/jsp/include.jsp" %>
<html>
<head>
<title> Spring Getting Started with EmpInfo Application </title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">

116

Getting Started with Spring

Advertising
This manual is related to the following products: