All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.web.rules.Web.MultiplePageDirectivesCheck.html Maven / Gradle / Ivy

There is a newer version: 2.6.0.1053
Show newest version

While you can use as many page directives as you like, it is more readable to set multiple page attributes in a single directive.

The exception to this rule is when multiple packages are being imported. In that case, imports may be done in separate directives and all other attributes should be set in a single, additional directive.

Noncompliant Code Example

<%@ page session="false" %>
<%@ page import="java.util.*" %>
<%@ page errorPage="error.jsp" %> <!-- Noncompliant -->
<%@ page import="java.text.*" %>

Compliant Solution

<%@ page session="false"
                   errorPage="error.jsp" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy