濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > JSP的include指令的使用方法

JSP的include指令的使用方法

熱門(mén)標(biāo)簽:如何看懂地圖標(biāo)注點(diǎn) 自繪地圖標(biāo)注數(shù)據(jù) 潤(rùn)滑油銷(xiāo)售電銷(xiāo)機(jī)器人 電話機(jī)器人需要使用網(wǎng)絡(luò)嗎 外呼系統(tǒng)使用方法 給地圖標(biāo)注得傭金 海外圖書(shū)館地圖標(biāo)注點(diǎn) 南通通訊外呼系統(tǒng)產(chǎn)品介紹 電銷(xiāo)機(jī)器人免培訓(xùn)

JSP的include指令的使用方法

一 語(yǔ)法

%@ 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>

 三 測(cè)試結(jié)果

如有疑問(wèn)請(qǐng)留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對(duì)本站的支持!

您可能感興趣的文章:
  • jsp中include指令靜態(tài)導(dǎo)入和動(dòng)態(tài)導(dǎo)入的區(qū)別詳解
  • JSP指令元素(page指令/include指令/taglib指令)復(fù)習(xí)整理
  • JSP中include指令和include行為的區(qū)別

標(biāo)簽:樂(lè)山 銅川 南京 內(nèi)江 貸款邀約 大連 黃石 廣州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《JSP的include指令的使用方法》,本文關(guān)鍵詞  JSP,的,include,指令,使用方法,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《JSP的include指令的使用方法》相關(guān)的同類(lèi)信息!
  • 本頁(yè)收集關(guān)于JSP的include指令的使用方法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    武邑县| 达拉特旗| 金湖县| 长宁县| 磴口县| 长寿区| 竹北市| 易门县| 林周县| 海城市| 黑龙江省| 京山县| 镇宁| 嘉祥县| 淳化县| 青冈县| 岢岚县| 通榆县| 西藏| 神池县| 花莲县| 库车县| 中山市| 和林格尔县| 乌拉特前旗| 东乡| 宝鸡市| 乡宁县| 邮箱| 平江县| 泊头市| 牙克石市| 嘉定区| 东莞市| 石楼县| 迁西县| 文化| 德格县| 行唐县| 西吉县| 手游|