校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識庫 > JSP的include指令的使用方法

JSP的include指令的使用方法

熱門標簽:如何看懂地圖標注點 自繪地圖標注數據 潤滑油銷售電銷機器人 電話機器人需要使用網絡嗎 外呼系統使用方法 給地圖標注得傭金 海外圖書館地圖標注點 南通通訊外呼系統產品介紹 電銷機器人免培訓

JSP的include指令的使用方法

一 語法

%@ include file="URL"%>

二 代碼

1、date.jsp

%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
%@ page import="java.text.*" %>
%
  Date d = new Date();
  SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
  String s = sdf.format(d);
  out.println(s);
%>

2、include_command.jsp

%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"%>
%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
 
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
html>
 head>
  base href="%=basePath%>" rel="external nofollow" >
  
  title>My JSP 'Include_Command.jsp' starting page/title>
  
    meta http-equiv="pragma" content="no-cache">
    meta http-equiv="cache-control" content="no-cache">
    meta http-equiv="expires" content="0">  
    meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    meta http-equiv="description" content="This is my page">
    !--
    link rel="stylesheet" type="text/css" href="styles.css" rel="external nofollow" >
    -->
 
 /head>
 
 body>
  h1>Include指令/h1>
  hr>
  %@ include file="date.jsp"%>
 /body>
/html>

 三 測試結果

如有疑問請留言或者到本站社區交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!

您可能感興趣的文章:
  • jsp中include指令靜態導入和動態導入的區別詳解
  • JSP指令元素(page指令/include指令/taglib指令)復習整理
  • JSP中include指令和include行為的區別

標簽:樂山 銅川 南京 內江 貸款邀約 大連 黃石 廣州

巨人網絡通訊聲明:本文標題《JSP的include指令的使用方法》,本文關鍵詞  JSP,的,include,指令,使用方法,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《JSP的include指令的使用方法》相關的同類信息!
  • 本頁收集關于JSP的include指令的使用方法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 南川市| 松阳县| 湖南省| 襄汾县| 三穗县| 万荣县| 肇东市| 紫阳县| 岳池县| 绍兴县| 遵化市| 淮滨县| 天水市| 龙门县| 英吉沙县| 萨迦县| 理塘县| 砚山县| 上蔡县| 康马县| 抚远县| 泰宁县| 巴彦淖尔市| 板桥市| 屏山县| 凤庆县| 买车| 辉南县| 虞城县| 陇西县| 荆门市| 平舆县| 菏泽市| 紫云| 丰县| 成安县| 绥芬河市| 兴业县| 彭阳县| 杭州市| 富民县|