关于使用maven tomcat插件调试,出现前端界面导航栏无法显示的问题 5C

部署到tomcat服务器中显示正常

部署到tomcat服务器中显示正常

左侧本该有的导航栏没有显示出来

左侧本该有的导航栏没有显示出来

我定位到那个html网页,

 [#macro script]
[/#macro] 
[#macro script_import]
[/#macro]
[#macro css]
[/#macro]
[#macro css_import]
[/#macro]
[#macro layout]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
   [#include "/includes/header.html" /]
   [@css_import /]
   <style type="text/css">
   [@css /]
   </style>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
<!-- Site wrapper -->
<div id="wrapper">
    [#include "/includes/menus.html" /]
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
        <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
           <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="javascript:void(0)"><i class="fa fa-bars"></i> </a>
                <form role="search" class="navbar-form-custom" method="post" action="search_results.html">
                    <div class="form-group">
                        <a href="http://www.dbumama.com" class="form-control" style="padding-top:16px" target="_blank">在线帮助</a>
                    </div>
                </form> 
            </div>
            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown hidden-xs">
                [@shiro.authenticated]
                    [@shiro.authUser]
                        [#if authUser??]
                            <a href="javascript:void(0)" class="dropdown-toggle">${authUser.app_name}</a>
                        [#else]
                            <a href="${webctx}/setting" class="dropdown-toggle" style="color: red">未绑定公众账号,去绑定</a>
                        [/#if]
                    [/@shiro.authUser]
                [/@shiro.authenticated]
                </li>

                <li class="dropdown hidden-xs">
                    <a href="javascript:void(0)">
                    [@shiro.authenticated]
                        [@shiro.principal name="phone"/]
                    [/@shiro.authenticated]</a>
                </li>

                <li class="hidden-xs"><a href="${webctx}/logout"><i class="fa fa-power-off"></i>退出</a></li>
            </ul>
        </nav>
        </div>
        <div class="row J_mainContent" id="content-main">
            [#nested]
        </div>
        [#include "/includes/footer.html"/]
    </div>
     <!--右侧部分结束-->
</div>
<!-- ./wrapper -->
[@script_import /]
<script>
[@script /]
$(document).ready(function(){
    fix();
});
function fix() {
    var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
    var window_height = $(window).height();
    var sidebar_height = $(".sidebar").height();

    if (window_height >= sidebar_height + neg) {
      $(".content-wrapper, .right-side").css('min-height', window_height - neg);
    } else {
      $(".content-wrapper, .right-side").css('min-height', sidebar_height );
    }
}
</script>
</body>
</html>
[/#macro]

大概觉得右侧的导航栏应该是这一段,通过认证,然后从数据库中取导航项目。


<li class="dropdown hidden-xs">
                    <a href="javascript:void(0)">
                    [@shiro.authenticated]
                        [@shiro.principal name="phone"/]
                    [/@shiro.authenticated]</a>
                </li>

我的问题:怎样才能让左侧导航栏在用tomcat插件调试的时候能够显示出来?感觉跟认证有关系,还请大神帮忙看看问题出在哪里?还有网页中大量出现的[@shiro.authenticated]、[#macro script_import]是什么意思?。万分感谢

2个回答

是不是shiro权限控制的问题。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问