# jsp_template **Repository Path**: blacktarry/jsp_template ## Basic Information - **Project Name**: jsp_template - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2016-08-23 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #jsp_template jsp template 是参考了 rapid_jsp_extends tags 实现所做的一个 jsp 模版。 ## 目的 - 使jsp可以实现类似"类"的继承关系,并不限继承层次 - 页面布局,父jsp页面定义好布局,子jsp可以重定义布局中的部分内容 ## demo ### example1 template.jsp 如下: ``` <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="/WEB-INF/tld/template.tld" prefix="t" %> <t:page name="title" value="模版title" />-网站名称 <%@include file="/jsp/struct/head_include.jsp" %>

容器内容

<%@include file="/jsp/struct/foot_include.jsp" %> ``` home.jsp ``` <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib uri="/WEB-INF/tld/template.tld" prefix="t" %>

Navbar example

This example is a quick exercise to illustrate how the default, static and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.

To see the difference between static and fixed top navbars, just scroll.

View navbar docs »

``` 在 home.jsp,覆盖了template.jsp 的title,contianer,foot_custom_include 三个模块,其他的和模板一致 ## 不足之处 标签 template 不能嵌套,此问题暂时没有想到好的解决方式。如下方式的调用,暂还不支持: ``` ```