February 2005
Intermediate to advanced
1296 pages
29h 21m
English
To modify the index.jsp file in the third example to display a page similar to Figure 1-17, create a index1.jsp page containing the following code:
<%@ taglib prefix="wroxtags" tagdir="/WEB-INF/tags" %>
<html>
<head>
<title><wroxtags:bookTitle/></title>
</head>
<body>
<h1><wroxtags:bookTitle/></h1>
<p><i>published by <wroxtags:publisher/></i></p>
<p><small>Note: You will need <wroxtags:containerName/> to use this book.</small></p>
</body>
</html>There is a tag called showBrowser.tag in the WEB-INF/tags directory. You will need to use this tag in creating index2.jsp:
<%@ taglib prefix="wroxtags" tagdir="/WEB-INF/tags" %>
<html>
<head>
<title>Book Information</title>
</head>
<body>
<h1>Book Information</h1><hr>
<p>The name of this book is <i><wroxtags:bookTitle/></i>.</p>
<p>It is published by <wroxtags:publisher/>.</p>
<p>The server used in all the examples is <wroxtags:containerName/>.</p>
<p>The browser you are using is <wroxtags:showBrowser/>.</p>
</body>
</html>Create a showportal.jsp file that contains the following:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <html> <head> <link rel=stylesheet type="text/css" href="portal.css"> <title>New Portal</title> </head> <body> <jsp:include page="news.jsp" > <jsp:param name="mode" value="standalone"/> </jsp:include> <jsp:include page="weather.jsp" > <jsp:param name="mode" value="standalone"/> </jsp:include> <jsp:include ...
Read now
Unlock full access