Answer the question
In order to leave comments, you need to log in
How to make header loading automatic?
Now I’ll write a little more specifically what I meant from the top, if I’m doing something on spring mvc
You can do it so that you don’t write a header in all jsp files, if so, how did I type a couple of options, if so, throw a link where you can about it read, or as such a method is called.
Is it possible to make a link in one of the jsp files a link to another (page header), so that when you run 1 file, the second one is also loaded.
Or
In the controller, write the name of the file (.jsp), and when the main file was launched, the secondary one was also loaded.
Answer the question
In order to leave comments, you need to log in
There are already three ways:
<!-- Статический импорт с помощью директивы -->
<%@ include file="filename" %>
<!-- Динамический импорт с помощью тега -->
<jsp:include page="filename"/>
<!-- Импорт с помощью JSTL -->
<c:import url="filename" />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question