Modifying the index.jsp file – HP Integrity NonStop J-Series User Manual

Page 79

Advertising
background image

</bean>

<bean name="/retrieveordelete.htm"

class="com.hp.empinfo.web.EmployeeController">
<property name="formView">
<value>retrieveordelete</value>
</property>
<property name="commandClass">
<value>com.hp.empinfo.domain.Employee</value>
</property>
<property name="commandName">
<value>emprord</value>
</property>
</bean>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView"></property>
<property name="prefix" value="/WEB-INF/jsp/"></property>
<property name="suffix" value=".jsp"></property>
</bean>

</beans>

Modifying the index.jsp File

Modify the index.jsp file in the EmpInfo/WebContent directory to provide the links to retrieve
or delete a page as shown:

<%@ 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>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Spring Getting Started with EmpInfo Application</title>
</head>
<body>
<h2 align="center"> Welcome to the EmpInfo Application </h2>
<br>
<h4><a href=<c:url value="insert.htm"/>>Insert Employee</a></h4>

<h4><a href=<c:url value="retrieveordelete.htm"/>> Retrieve or Delete</a></h4>
<br>
</body>
</html>

Figure 21

shows how the EmpInfo application directory structure looks like after creating the

requisite files on the system.

Getting Started with Spring

79

Advertising
This manual is related to the following products: