java - Display Navigation Bar Throughout Spring MVC/JSP Application -
I am in the process of creating a JSP based website using Spring MVC framework and bootstrap, and I have all of my different The web page is very late in the game. I have decided that I want to add a navigation bar to my website. I have already created the navigation bar but it's easy to "tack" on other web pages, so I do not need to duplicate the code in different files?
If I include the navigation bar HTML code in a separate file and include it on the JSP page, will it show up properly?
Is there a general standard way for people to expand the navigation bar on their entire website? I am convinced that those who have experience in creating websites should easily answer it. I definitely appreciate any help that can be offered. Thanks!
Create a tag like navbar.tag
in tags
directory that will be in your WEB-INF
dir. Add your code there and include it in the desired JSP pages Add to the header to add your tag to JSP:
and use your tag like this:
& lt; Html & gt; & Lt; Body & gt; & Lt; Mytags: navbar / & gt; & Lt; / Body & gt; & Lt; / Html & gt;
Comments
Post a Comment