@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
request.setAttribute("title", title);
request.setAttribute("include", "Вставка кода");
getServletContext().getRequestDispatcher("/index.jsp").forward(request, response);
}
}
<%--
Created by IntelliJ IDEA.
User: User
Date: 20.10.2022
Time: 21:49
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>${title}</title>
<link rel="stylesheet" type="text/css" href="/css/tag.css">
<link rel="stylesheet" type="text/css" href="/css/class.css">
<link rel="stylesheet" type="text/css" href="/css/menu.css">
</head>
<body>
<div class="header">
<div class="header-top"></div>
<div class="header-middle">
<nav id='menu'>
<ul>
<li><a href='/'>Главная</a></li>
<li><a href='/generate'>Генерация</a></li>
</ul>
</nav>
</div>
<div class="header-bottom"></div>
</div>
<div class="main">
${include}
</div>
В чём может быть проблем? Вроде все по спецификации.