martin-g commented on a change in pull request #351: URL: https://github.com/apache/tomcat/pull/351#discussion_r483001907
########## File path: java/org/apache/jasper/EmbeddedServletOptions.java ########## @@ -84,6 +84,11 @@ */ private boolean classDebugInfo = true; + /** + * Do we want to Trim White Space in the in JSP Files? + */ + private boolean JSPWhiteSpaceTrimming = false; Review comment: `jspWhiteSpaceTrimming` looks better to me. It follows Java coding conventions ########## File path: java/org/apache/jasper/EmbeddedServletOptions.java ########## @@ -84,6 +84,11 @@ */ private boolean classDebugInfo = true; + /** + * Do we want to Trim White Space in the in JSP Files? Review comment: why `Trim White Space` is capitalized here ? ########## File path: java/org/apache/jasper/EmbeddedServletOptions.java ########## @@ -635,6 +648,19 @@ public EmbeddedServletOptions(ServletConfig config, ServletContext context) { } } + String jspWhiteSpaceTrim = config.getInitParameter("JSPWhiteSpaceTrimming"); + if (jspWhiteSpaceTrim != null) { + if (jspWhiteSpaceTrim.equalsIgnoreCase("true")) { + this.JSPWhiteSpaceTrimming = true; + } else if (jspWhiteSpaceTrim.equalsIgnoreCase("false")) { + this.JSPWhiteSpaceTrimming = false; + } else { + if (log.isWarnEnabled()) { + log.warn(Localizer.getMessage("Invalid Value for the flag")); Review comment: The `key` for `getMessage()` looks weird here. See the other usages of Localizer.getMessage() with `jsp.warning.**` keys. ########## File path: java/org/apache/jasper/EmbeddedServletOptions.java ########## @@ -84,6 +84,11 @@ */ private boolean classDebugInfo = true; + /** + * Do we want to Trim White Space in the in JSP Files? + */ + private boolean JSPWhiteSpaceTrimming = false; Review comment: What is the difference with https://github.com/apache/tomcat/blob/6aef6f468c843f2bcdec4b57884d1e7e65c03365/java/org/apache/jasper/EmbeddedServletOptions.java#L601 ? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org