1

I have more than two jsp pages. And into every page I have a common jsp code like this(navigation bar)

<nav>
    <div class="nav-wrapper green darken-1 ">
        <a href="#" class="brand-logo left"> SBT</a>
        <ul id="nav-mobile" class="right hide-on-med-and-down">
            <li><a href="menu">Menu</a></li>
            <li><a href="home">Home</a></li>
            <li><a href="test">Test</a></li>
        </ul>
    </div>
</nav>

I don't wanna copy this or even more then this part into every jsp page. How to connect nav.jsp, which contain this code to every jsp page. And will it work slower or faster?

jenius
  • 257
  • 1
  • 4
  • 17

1 Answers1

1

Create 3rd file say nav.jsp write your common code into it and simply include your nav.jsp wherever you want You can use include action or include directive(consider the Advantage of both the ways and use the way which is convenient to you).