layout.jsp:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%><%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><%@ taglib uri="jsp_layout.tld" prefix="rapid"%><!DOCTYPE html><htmllang="zh-CN"><head><basehref="<%=basePath%>"><rapid:blockname="head"><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width, initial-scale=1"><!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! --><metaname="description"content=""><metaname="author"content=""><linkrel="icon"href="../../favicon.ico"><title>Starter Template for Bootstrap</title><!-- Bootstrap core CSS --><linkhref="frameworks/bootstrap3/css/bootstrap.min.css"rel="stylesheet"><!-- Custom styles for this template --><linkhref="custom/css/plugin/starter-template.css"rel="stylesheet"><!-- Just for debugging purposes. Don't actually copy these 2 lines! --><!--[if lt IE 9]><script src="frameworks/bootstrap/js/ie8-responsive-file-warning.js"></script><![endif]--><scriptsrc="frameworks/bootstrap3/js/ie-emulation-modes-warning.js"></script><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --><!--[if lt IE 9]>
<script src="frameworks/bootstrap3/js/html5shiv.min.js"></script>
<script src="frameworks/bootstrap3/js/respond.min.js"></script>
<![endif]--></rapid:block></head><body><navclass="navbar navbar-inverse navbar-fixed-top"><divclass="container"><divclass="navbar-header"><buttontype="button"class="navbar-toggle collapsed"data-toggle="collapse"data-target="#navbar"aria-expanded="false"aria-controls="navbar"><spanclass="sr-only">Toggle navigation</span><span
class="icon-bar"></span><spanclass="icon-bar"></span><span
class="icon-bar"></span></button><aclass="navbar-brand"href="#">Bootstrap theme</a></div><divid="navbar"class="navbar-collapse collapse"><ulclass="nav navbar-nav"><liclass="active"><ahref="#">Home</a></li><li><ahref="#about">About</a></li><li><ahref="#contact">Contact</a></li><liclass="dropdown"><ahref="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-haspopup="true"aria-expanded="false">Dropdown <spanclass="caret"></span></a><ulclass="dropdown-menu"><li><ahref="#">Action</a></li><li><ahref="#">Another action</a></li><li><ahref="#">Something else here</a></li><lirole="separator"class="divider"></li><liclass="dropdown-header">Nav header</li><li><ahref="#">Separated link</a></li><li><ahref="#">One more separated link</a></li></ul></li></ul></div><!--/.nav-collapse --></div></nav><divclass="container"><rapid:blockname="body"><divclass="starter-template"><h1>Bootstrap starter template</h1><pclass="lead">
Use this document as a way to quickly start any new project.<br>
All you get is this text and a mostly barebones HTML document.
</p></div></rapid:block></div><!-- /.container --><rapid:blockname="script"><!-- Bootstrap core JavaScript
================================================== --><!-- Placed at the end of the document so the pages load faster --><scriptsrc="frameworks/bootstrap3/js/jquery.min.js"></script><scriptsrc="frameworks/bootstrap3/js/bootstrap.min.js"></script><!-- IE10 viewport hack for Surface/desktop Windows 8 bug --><scriptsrc="frameworks/bootstrap3/js/ie10-viewport-bug-workaround.js"></script></rapid:block></body></html>
home.jsp:
<%@ taglib uri="jsp_layout.tld" prefix="rapid"%>
<rapid:override name="body">
Youth is notatimeof life, it is a state of mind.青春不是生命的一瞬,而是一种自然的心境。
</rapid:override>
<%@ includefile="../layout/layout.jsp"%>