Creating jsps, Modifying jsps, Welcome.jsp – HP Integrity NonStop J-Series User Manual

Page 432

Advertising
background image

3.

Modifying JSPs

4.

Creating the mycss.css File

Creating Pages folder

Create a new folder pages under EmpInfo/WebContent as explained in the

Creating a folder

to store JSPs

section in the

Getting Started with Spring

chapter.

Creating JSPs

Create the following JSP files under EmpInfo/WebContent/pages as explained in the

Creating

the index.jsp File

section in the

Getting Started with Spring

chapter.

welcome.jsp

insert.jsp

empUpdate.jsp

empDetail.jsp

success.jsp

Modifying JSPs

To modify the above-created JSPs, complete the following steps:

welcome.jsp

This page contains the links to insert page and empUpdate page.

Replace the contents of the existing welcome.jsp file with the code given below:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<f:view>

<html>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<head>
<title>Record Insertion</title>
<link href="mycss.css" rel="stylesheet" type="text/css" />
</head>
<body>
<center><h:form id="WelcomeForm">

<h:panelGrid width="100%" columns="1" border="0">
<h:dataTable id="dt1" border="0" cellpadding="0" cellspacing="0"
var="ab">
<h:column>
<f:facet name="header">
<h:outputText value="SpringFaces" styleClass="style4" />
</f:facet>
</h:column>
</h:dataTable>
</h:panelGrid>

<h:panelGrid width="175px" columns="3" border="0" cellspacing="0"
cellpadding="0">

<t:htmlTag value="div">
<h:panelGroup>
<br>
</br>

<h:dataTable id="dt2" border="0" cellpadding="0" cellspacing="0"
width="250" var="gh">
<h:column>

432 Integrating MyFaces into Spring

Advertising
This manual is related to the following products: