视图未按预期显示

时间:2015-06-05 10:13:52

标签: grails

当我重定向到页面时,虽然URL显示它在视图中,但我没有获得视图。 URL显示 http://localhost:8080/Employee/view_profile但该页面为空白。

来自/Project_level/add_members.gsp我想去/Employee/view_profile.gsp

add_members.gsp

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">  
        <title>Visual Admin Dashboard - Manage Users</title>
        <meta name="description" content="">
        <meta name="author" content="templatemo">
        <!-- 
        Visual Admin Template
        http://www.templatemo.com/preview/templatemo_455_visual_admin
        -->
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,400italic,700' rel='stylesheet' type='text/css'>
        <link href="${request.contextPath}/admin_template/css/font-awesome.min.css" rel="stylesheet">
        <link href="${request.contextPath}/admin_template/css/bootstrap.min.css" rel="stylesheet">
        <link href="${request.contextPath}/admin_template/css/templatemo-style.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="${request.contextPath}/admin_template/https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="${request.contextPath}/admin_template/https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->

      </head>
      <body>  
        <!-- Left column -->
        <div class="templatemo-flex-row">
          <div class="templatemo-sidebar">
            <header class="templatemo-site-header">
              <div class="square"></div>
              <h1>Visual Admin</h1>
            </header>
            <div class="profile-photo-container">
              <img src="${request.contextPath}/admin_template/images/profile-photo.jpg" alt="Profile Photo" class="img-responsive">  
              <div class="profile-photo-overlay"></div>
            </div>      
            <!-- Search box -->
            <form class="templatemo-search-form" role="search">
              <div class="input-group">
                  <button type="submit" class="fa fa-search"></button>
                  <input type="text" class="form-control" placeholder="Search" name="srch-term" id="srch-term">           
              </div>
            </form>
            <div class="mobile-menu-icon">
                <i class="fa fa-bars"></i>
              </div>
            <nav class="templatemo-left-nav">          
              <ul>
                <li><a href="${request.contextPath}/admin_template/index.html"><i class="fa fa-home fa-fw"></i>Dashboard</a></li>
                <li><a href="${request.contextPath}/admin_template/data-visualization.html"><i class="fa fa-bar-chart fa-fw"></i>Charts</a></li>
                <li><a href="${request.contextPath}/admin_template/data-visualization.html"><i class="fa fa-database fa-fw"></i>Data Visualization</a></li>
                <li><a href="${request.contextPath}/admin_template/maps.html"><i class="fa fa-map-marker fa-fw"></i>Maps</a></li>
                <li><a href="${request.contextPath}/admin_template/#" class="active"><i class="fa fa-users fa-fw"></i>Manage Users</a></li>
                <li><a href="${request.contextPath}/admin_template/preferences.html"><i class="fa fa-sliders fa-fw"></i>Preferences</a></li>
                <li><a href="${request.contextPath}/admin_template/login.html"><i class="fa fa-eject fa-fw"></i>Sign Out</a></li>
              </ul>  
            </nav>
          </div>
          <!-- Main content --> 
          <div class="templatemo-content col-1 light-gray-bg">
            <div class="templatemo-top-nav-container">
              <div class="row">
                <nav class="templatemo-top-nav col-lg-12 col-md-12">
                  <ul class="text-uppercase">
                    <li><a href="${request.contextPath}/admin_template/" class="active">Admin panel</a></li>
                    <li><a href="${request.contextPath}/admin_template/">Dashboard</a></li>
                    <li><a href="${request.contextPath}/admin_template/">Overview</a></li>
                    <li><a href="${request.contextPath}/admin_template/login.html">Sign in form</a></li>
                  </ul>  
                </nav> 
              </div>
            </div>

              <div class="templatemo-flex-row flex-content-row">
                <div class="templatemo-content-widget white-bg col-1">

                  <div class="media margin-bottom-30">
                    <div class="media-left padding-right-25">
                      <a href="/Employee/view_profile">
                        <img class="media-object img-circle templatemo-img-bordered" src="${request.contextPath}/admin_template/images/person.jpg" >
                      </a>
                    </div>
                    <div class="media-body">
                      <h2 class="media-heading text-uppercase blue-text">John Barnet</h2>
                      <p>Project Manager</p>

                      <a href="${request.contextPath}/admin_template/" class="btn btn-default templatemo-view-img-btn">Add to Project</a>  

                    </div>         
                  </div>
                  <div class="table-responsive">
                    <table class="table">
                      <tbody>
                        <tr>
                          <td><div class="circle green-bg"></div></td>
                          <td>New Task Issued</td>
                          <td>02</td>                    
                        </tr> 
                        <tr>
                          <td><div class="circle pink-bg"></div></td>
                          <td>Task Pending</td>
                          <td>22</td>                    
                        </tr>  
                        <tr>
                          <td><div class="circle blue-bg"></div></td>
                          <td>Performance Index</td>
                          <td>13</td>                    
                        </tr>                                       
                      </tbody>
                    </table>
                  </div>             
                </div>
                <div class="col-1">              
                  <div class="templatemo-content-widget pink-bg">
                    <i class="fa fa-times"></i>                
                    <h2 class="text-uppercase margin-bottom-10">Latest Data</h2>
                    <p class="margin-bottom-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc mi sapien, fringilla at orci nec, viverra rhoncus leo. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus rhoncus erat non purus commodo, sit amet varius dolor sagittis.</p>                  
                  </div>            
                  <div class="templatemo-content-widget blue-bg">
                    <i class="fa fa-times"></i>
                    <h2 class="text-uppercase margin-bottom-10">Older Data</h2>
                    <p class="margin-bottom-0">Phasellus dapibus nulla quis risus auctor, non placerat augue consectetur. Aliquam convallis pharetra odio, in convallis erat molestie sed. Fusce mi lacus, semper sit amet mattis eu, volutpat vitae enim.</p>                
                  </div>            
                </div>                       

              </div> <!-- Second row ends -->
              <div class="templatemo-flex-row">
                <div class="templatemo-content-widget white-bg col-1">

                  <div class="media margin-bottom-30">
                    <div class="media-left padding-right-25">
                      <a href="${request.contextPath}/admin_template/#">
                        <img class="media-object img-circle templatemo-img-bordered" src="${request.contextPath}/admin_template/images/person.jpg" >
                      </a>
                    </div>
                    <div class="media-body">
                      <h2 class="media-heading text-uppercase blue-text">John Barnet</h2>
                      <p>Project Manager</p>

                      <a href="${request.contextPath}/admin_template/" class="btn btn-default templatemo-view-img-btn">Add to Project</a>  

                  </div>         
                  </div>
                  <div class="table-responsive">
                    <table class="table">
                      <tbody>
                        <tr>
                          <td><div class="circle green-bg"></div></td>
                          <td>New Task Issued</td>
                          <td>02</td>                    
                        </tr> 
                        <tr>
                          <td><div class="circle pink-bg"></div></td>
                          <td>Task Pending</td>
                          <td>22</td>                    
                        </tr>  
                        <tr>
                          <td><div class="circle blue-bg"></div></td>
                          <td>Performance Index</td>
                          <td>13</td>                    
                        </tr>                                       
                      </tbody>
                    </table>
                  </div>             
                </div>



              </div>

              <div class="pagination-wrap">
                <ul class="pagination">
                  <li><a href="${request.contextPath}/admin_template/#">1</a></li>
                  <li><a href="${request.contextPath}/admin_template/#">2</a></li>
                  <li class="active"><a href="${request.contextPath}/admin_template/#">3 <span class="sr-only">(current)</span></a></li>
                  <li><a href="${request.contextPath}/admin_template/#">4</a></li>
                  <li><a href="${request.contextPath}/admin_template/#">5</a></li>
                  <li>
                    <a href="${request.contextPath}/admin_template/#" aria-label="Next">
                      <span aria-hidden="true"><i class="fa fa-play"></i></span>
                    </a>
                  </li>
                </ul>
              </div>          
              <footer class="text-right">
                <p>Copyright &copy; 2084 Company Name | Designed by <a href="${request.contextPath}/admin_template/http://www.templatemo.com" target="_parent">templatemo</a></p>
              </footer>         
            </div>
          </div>
        </div>

        <!-- JS -->
        <script type="text/javascript" src="${request.contextPath}/admin_template/js/jquery-1.11.2.min.js"></script>      <!-- jQuery -->
        <script type="text/javascript" src="${request.contextPath}/admin_template/js/templatemo-script.js"></script>      <!-- Templatemo Script -->
        <script>
          $(document).ready(function(){
            // Content widget with background image
            var imageUrl = $('img.content-bg-img').attr('src');
            $('.templatemo-content-img-bg').css('background-image', 'url(' + imageUrl + ')');
            $('img.content-bg-img').hide();        
          });
        </script>
      </body>
    </html>

view_profile.gsp

    <!DOCTYPE html>
    <html>
      <head>
      <meta name="layout" content="admin_template"/>
        <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,400italic,700' rel='stylesheet' type='text/css'>
        <link href="css/font-awesome.min.css" rel="stylesheet">
        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="css/templatemo-style.css" rel="stylesheet">
      </head>
      <body>     
          <div class="media-body">
            <a href="/Project/add_members" class="btn btn-default templatemo-view-img-btn">OK</a>  
          </div>  
      </body>
    </html>

0 个答案:

没有答案