vue路由:http://www.runoob.com/vue2/vue-routing.html

 

避免整个页面刷新过程中的明显空白期,决定更改前端实现方式。

 

base.jsp

<frameset rows="44px,*,44px">

      <frame src="../head" scrolling="no" frameborder="0" noresize="noresize">

      <frameset cols="15%,85%">

            <frame src="../left" scrolling="no" noresize="noresize" >

            <!-- 初始默认页面 name=“show”,可以打开<a target="show" />-->

            <frame src="../user/queryList" name="show" scrolling="yes" >

      </frameset>

      <frame src="../footer" scrolling="no" frameborder="0" noresize="noresize">

</frameset>

以上由于上、左、下部分打开时无需访问服务端接口,需直接访问路径,但由于WEB-INF下的jsp无法直接跳转。

应在web.xml中加以配置

<!-- 使frame方便引用Web-inf下资源 -->

  <servlet>

            <servlet-name>head</servlet-name>

            <jsp-file>/WEB-INF/views/basis/Head.jsp</jsp-file>

  </servlet>

  <servlet>

            <servlet-name>left</servlet-name>

            <jsp-file>/WEB-INF/views/basis/Left.jsp</jsp-file>

  </servlet>

  <servlet>

            <servlet-name>footer</servlet-name>

            <jsp-file>/WEB-INF/views/basis/footer.jsp</jsp-file>

  </servlet>

 

 

  <servlet-mapping>

            <servlet-name>head</servlet-name>

            <url-pattern>/head</url-pattern>

  </servlet-mapping>

  <servlet-mapping>

            <servlet-name>left</servlet-name>

            <url-pattern>/left</url-pattern>

  </servlet-mapping>

  <servlet-mapping>

            <servlet-name>footer</servlet-name>

            <url-pattern>/footer</url-pattern>

  </servlet-mapping>

 

Left.jsp

<!--以下menu信息是放在 httpSession.setAttribute("menu", list-->

<!--由于作用域不同,前端需使用 sessionScope  -->

 

<aside style="backgroud-color: white" class="Hui-aside">

            <div class="menu_dropdown bk_2" style="display: none!imporant;">

                  <dl id="menu-article">

                        <c:forEach var="item" items="${sessionScope.menu }">

                        <dt>

                              <i class="Hui-iconfont">&#xe616;</i> ${item.menuName}<i

                                    class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i>

                        </dt>

                        <dd>

                              <ul>

                              <c:forEach var="it" items="${item.childList }">

                                    <li><a href="${it.menuUrl }" title="${it.menuName }" target="show">${it.menuName }</a></li>

                              </c:forEach>

                              </ul>

                        </dd>

                        </c:forEach>

                  </dl>

                  

            </div>

</aside>

 

 

Logo

前往低代码交流专区

更多推荐