一个公共的common.jsp,使用Bootstrap所需的引入内容

简介: <%@ page isELIgnored="false" %><%@ page language="java" pageEncoding="UTF-8"%><%@page import="java.util.Date"%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %
<%@ page isELIgnored="false" %>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath();
%>
<c:set var="basePath" value="<%=basePath %>"  scope="session"/>

<c:set var="contextPath" value="${pageContext.request.contextPath}" scope="session"/>
<c:set var="imagesPath" value="${basePath}/images"  scope="session"/>
<c:set var="stylesPath" value="${basePath}/css"  scope="session"/>
<c:set var="scriptsPath" value="${basePath}/scripts/"  scope="session"/>

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
  	<script src="${scriptsPath}/browser-compatibility-js/html5shiv.min.js?now=${timestamp}"></script>
    <script src="${scriptsPath}/browser-compatibility-js/respond.min.js?now=${timestamp}"></script>
<![endif]-->

<!-- constants variable -->
<script type="text/javascript">
	var basePath = '${basePath}';
	var contextPath = '${contextPath}';
	var imagesPath = '${imagesPath}';
	var stylesPath = '${stylesPath}';
	var scriptsPath = '${scriptsPath}';
</script>
<script type="text/javascript" src="${scriptsPath}/jQuery/jquery-1.11.3.min.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="${stylesPath}/base.css" />
<script type="text/javascript" src="${scriptsPath}/common/map.js" charset="utf-8"></script>
<script type="text/javascript" src="${scriptsPath}/common/common.js" charset="utf-8"></script>

<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="${scriptsPath}/bootstrap/css/bootstrap.min.css">
<!-- 可选的Bootstrap主题文件(一般不用引入) -->
<link rel="stylesheet" href="${scriptsPath}/bootstrap/css/bootstrap-theme.min.css">
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script type="text/javascript" src="${scriptsPath}/bootstrap/js/bootstrap.min.js" charset="utf-8"></script>

目录
相关文章
|
6月前
|
前端开发
在HTML页面中引入公共的部分的代码
在HTML页面中引入公共的部分的代码
46 0
|
9天前
|
XML 前端开发 Oracle
16:JSP简介、注释与Scriptlet、Page指令元素、Include操作、内置对象、四种属性-Java Web
16:JSP简介、注释与Scriptlet、Page指令元素、Include操作、内置对象、四种属性-Java Web
12 2
|
12天前
|
前端开发 JavaScript UED
【Web 前端】css的引用有哪些,link和@import的区别?
【4月更文挑战第22天】【Web 前端】css的引用有哪些,link和@import的区别?
|
6月前
|
前端开发
Thymeleaf 引入公共代码页面
Thymeleaf 引入公共代码页面
20 0
|
10月前
|
缓存 前端开发
antd如何引入public(公共目录)下的文件
antd如何引入public(公共目录)下的文件
224 0
|
JavaScript 前端开发 Java
JSP页面无法加载.js文件的解决方案
JSP页面无法加载.js文件的解决方案
|
前端开发 JavaScript 开发者
html-webpack-plugin 的两个基本作用| 学习笔记
快速学习 html-webpack-plugin 的两个基本作用
255 0
HtmlWebpackPlugin(html-webpack-plugin)传入自定义参数到模板
HtmlWebpackPlugin(html-webpack-plugin)传入自定义参数到模板
218 0