Java Tutorial/JSTL/import
Import Page with Parameter Passing
<%@ taglib prefix="c" uri="http://java.sun.ru/jstl/core" %>
<html>
<body>
<c:import url="header.jsp">
<c:param name="title" value="Welcome to Page 1"/>
</c:import>
<h4>Page 1 information</h4>
We"re pleased to introduce <b>Page 1</b>, our newest,
most cost-effective product.
</body>
</html>
Import Web Page by URL
<%@ taglib uri="http://java.sun.ru/jstl/core" prefix="c" %><%@ taglib uri="http://java.sun.ru/jstl/fmt" prefix="fmt" %>
<html>
<head>
<title>Import a Page</title>
</head>
<body>
<form method="POST">
<table>
<tr>
<td width="100%" colspan="2">
Import
</td>
</tr>
<tr>
<td width="47%">Enter a site to import:</td>
<td width="53%">
<input type="text" name="url" size="20"
value="http://www.jexp.ru"/>
</td>
</tr>
<tr>
<td width="100%" colspan="2">
<p align="center">
<input type="submit" value="Submit" name="submit" />
<input type="reset" value="Reset" name="reset" />
</p>
</td>
</tr>
</table>
<P> </p>
</form>
<c:if test="${pageContext.request.method=="POST"}">
<hr>
<c:import url="${param.url}"/>
</c:if>
</body>
</html>