<%@include file="/1.jsp"%> 标签使用注意事项

1.定义两个jsp   ‘1.jsp'    '2.jsp' 

1.jsp

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html>
<!--主导航页-->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <%@include file="/static/headjs.jsp"%>
<body>
<!--统一导航栏-->
<div class="center">
    <jsp:include file="/2.jsp"/jsp>
    >
</div>


2.jsp

<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@include file="/static/headjs.jsp"%>

            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>


2.注意事项

1.jsp和2.jsp是分别单独编译的,所以
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@include file="/static/headjs.jsp"%>
这些引用每个页面都需单独拥有,被引用页面最好是固定值,<jsp:include file="/2.jsp"/jsp>会先加载后编译,注意不要重复加载js

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值