Search code examples
javajspjstl

Enable JSTL support once and for all JSP pages (not on "per-every-single-page" basis)


In order to enable JSTL support in all my JSP pages I need to insert <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> tag in each one of them.

Is it possible to write some declaration once so that every JSP page in my project has jstl enabled by default?

I can create a template of a JSP page but I need to enable jstl support for many JSP pages previously created (then I will edit them).


Solution

  • You can't, you have to declare the library <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> on each page, there isn't any magic configuration file which can achieve this for you. However, you can make the insert of this row in your JSP easier.