JSPAdvertisementincludeアクション
書式
<jsp:include page="" flush="true" />includeディレクティブとの違い:挿入ファイルの実行結果が挿入される。このため、includeアクションではJSPファイルのみ指定できる。 includeアクションの利用
メイン
<%@ page contentType="text/html; charset=Shift_JIS" %> <meta http-equiv="Content-Type" content="text/html;charset=Shift_JIS"> <html lang="ja"> <head><title>include</title></head> <body> <%-- include --%> <jsp:include page="./date.jsp" flush="true" /> </body> </html>date.jsp <%@ page import="java.util.*" %> <% Calendar cal = Calendar.getInstance(); %> <p> <%= cal.getTime() %> </p>実行結果サンプル Thu Sep 18 21:55:32 JST 2003 |