1

我正在为我工​​作的公司开发一个内部网站,我的经理希望我将菜单作为 jsp 包含页面,而不是像这样将其编码到页面中(可行)。

<head>
<title>SomeCompany Intranet</title>
<jsp:include page="/jsp/head.jsp"/>
</head>
<body style="min-height: 75rem; padding-top:110px;">
<jsp:include page="/jsp/header.jsp"/>

<div class="sidenav">
   <div class="nav flex-column nav-pills" aria-orientation="vertical">
    <ul class="nav flex-column">      
    <li class="nav-item">
        <a class="nav-link disabled">Marketing</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="${pageContext.request.contextPath}/jsp/marketing/AA.jsp">Agent Access</a>
    </li>
    <li class="nav-item">
        <a class="nav-link active" href="${pageContext.request.contextPath}/jsp/marketing/ItemsCatalog.jsp">Promotional Items Catalog</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="${pageContext.request.contextPath}/jsp/marketing/OrderForm.jsp">Catalog Order Form</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="${pageContext.request.contextPath}/jsp/marketing/TravelForm.jsp">Travel Form</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="${pageContext.request.contextPath}/jsp/marketing/TuitionAssi.jsp">Tuition Assistance Form</a>
    </li>
    </ul>
  </div> 
</div>
<div class="mainHeader">
<h1>PROMOTIONAL ITEMS CATALOG</h1>
</div>

<div class="tab-content main1">
<iframe src="${pageContext.request.contextPath}/pdf/PromotionalCatalog 01-20.pdf" width="100%" 
height="100%"></iframe>
</div>

他希望它看起来更像这样。

<head>

<title>SomeCompany Intranet</title>
<jsp:include page="/jsp/head.jsp"/>

</head>

<body style="min-height: 75rem; padding-top:110px;">
<jsp:include page="/jsp/header.jsp"/>

<div class="sidenav">
  <jsp:include page="/jsp/marketing/TestMenu.jsp"
</div>

<div class="mainHeader">
  <h1>PROMOTIONAL ITEMS CATALOG</h1>
</div>

<div class="tab-content main1">
 <iframe src="${pageContext.request.contextPath}/pdf/PromotionalCatalog 01-20.pdf" width="100%" height="100%"></iframe>
</div>

</body>

这是 TestMenu.jsp

<div class="nav flex-column nav-pills" aria-orientation="vertical">
    <ul class="nav flex-column">      
    <li class="nav-item">
        <a class="nav-link disabled">Marketing</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="${pageContext.request.contextPath}/jsp/marketing/AA.jsp">Agent Access</a>
    </li>
    <li class="nav-item">
        <a class="nav-link active" href="${pageContext.request.contextPath}/jsp/marketing/ItemsCatalog.jsp">Promotional Items Catalog</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="${pageContext.request.contextPath}/jsp/marketing/OrderForm.jsp">Catalog Order Form</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="${pageContext.request.contextPath}/jsp/marketing/TravelForm.jsp">Travel Form</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="${pageContext.request.contextPath}/jsp/marketing/TuitionAssi.jsp">Tuition Assistance Form</a>
    </li>
    </ul>
 </div>

我的导航药片会启动,但它们不会将我带到实际页面。但是,如果我从 TestMenu 中删除活动,则链接将起作用。这是我试图完成的一件小事,它突出了正确的药丸,我只需要帮助弄清楚它。或者至少指出我正确的方向。

选择了错误的药片标签

即使我在 2020 年公司日历页面中,它也会突出显示项目团队指南。

4

0 回答 0