beautypg.com

Modifying the index.jsp file, Modifying the insert.jsp file, Modifying the – HP Integrity NonStop H-Series User Manual

Page 112: Index.jsp, File

background image

2.

Add the tag extensions (taglibs) to include the

.jsp

file so that your

include.jsp

file

appears as:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page session="false"%>

<%@ taglib prefix="c"
uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt"
uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form"
uri="http://www.springframework.org/tags/form" %>

NOTE:

The created header file must be included in every JSP page. This ensures that the

same definitions are included in all JSPs. You must add all the JSPs in a subdirectory named

jsp

in the

WEB-INF

directory. This allows views to be accessible via the controller because

these pages cannot be accessed via a URL.

Modifying the

index.jsp

File

To modify the

index.jsp

file, complete the following steps:

1.

Include the

include.jsp

file:

<%@ include file="/WEB-INF/jsp/include.jsp" %>

2.

Provide a link to the

insert.jsp

page as follows:

>Insert Employee

3.

Delete the following line from the

tag.

This is EmpInfo Test Page.

After modification, the

index.jsp

file appears as:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
"http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/jsp/include.jsp" %>



Spring Getting Started - EmpInfo Application


Welcome to the EmpInfo Application




>Insert Employee





Modifying the insert.jsp File

To modify the

insert.jsp

file, complete the following steps:

1.

Move the

insert.jsp

file to the

EmpInfo/WebContent/WEB-INF/jsp

directory by

dragging and dropping the file on your Eclipse window.

2.

Include the

include.jsp

file in

insert.jsp

:

<%@ include file="/WEB-INF/jsp/include.jsp" %>

112

Getting Started with Spring

This manual is related to the following products: