org.sonar.l10n.web.rules.Web.DynamicJspIncludeCheck.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-plugin Show documentation
Show all versions of sonar-web-plugin Show documentation
Enables scanning of HTML, and JSP/JSF files.
The newest version!
Content that doesn't change or that doesn't change often should be included using a mechanism which won't try to interpret it. Specifically,
<%@ include file="..." %>
, which includes the file in the JSP servlet translation phase (i.e. it happens once), should be used
instead of <jsp:include page="..." />
, which includes the page on the file, when the content is being served to the user.
Noncompliant Code Example
<jsp:include page="header.jsp"> <!-- Noncompliant -->
Compliant Solution
<%@ include file="header.jsp" %>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy