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

http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<bean name="/insert.htm"
class="com.hp.empinfo.web.EmployeeController">
<property name="formView">
<value>insert</value>
</property>
<property name="commandClass">
<value>com.hp.empinfo.domain.Employee</value>
</property>
<property name="commandName">
<value>emp</value>
</property>
</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>
shows what the EmpInfo application directory structure must look like after creating the
requisite files on the system.
122
Getting Started with Spring