'Can I declare <%@page~ contentType~ pageEncoding~%> or taglib like JSTL only once by using <jsp:include/>?

I had to declare

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="true" %>

these three lines for each page of jsp file in my Spring MVC project. I made header.jsp with the three lines and, and used into other jsp pages.

but it won't work. All my other jsp pages still needed to declare the three lines.

Any way not to declare the three lines for every page, and only declared by once?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source