You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are having a legacy stack with a web-app that is based on JSPs and, using this plugin, we want to validate the JSPs pages compilation before going to production.
The problem is that we found that setting ignoreJspFragmentErrors to true and using jspf as fragment file doe not work and the plugin is scanning them anyway.
We found in the code of the plugin that the variable ignoreJspFragmentErrors is used only in the logger and never passed along to the JSP compiler as shown in the snippet
// We are logging the config if we are in debug (ignoreJspFragmentErrors is there)getLog().info("verbose=" + verbose);
getLog().info("webAppSourceDirectory=" + webAppSourceDirectory);
getLog().info("generatedClasses=" + generatedClasses);
getLog().info("webXmlFragment=" + webXmlFragment);
getLog().info("webXml=" + webXml);
getLog().info("validateXml=" + validateXml);
getLog().info("packageRoot=" + packageRoot);
getLog().info("javaEncoding=" + javaEncoding);
getLog().info("insertionMarker="
+ (insertionMarker == null || insertionMarker.equals("") ? END_OF_WEBAPP : insertionMarker));
getLog().info("keepSources=" + keepSources);
getLog().info("mergeFragment=" + mergeFragment);
getLog().info("suppressSmap=" + suppressSmap);
getLog().info("ignoreJspFragmentErrors=" + ignoreJspFragmentErrors);
getLog().info("webXmlXsdSchema=" + webXmlXsdSchema);
getLog().info("stopAtFirstError=" + stopAtFirstError);
getLog().info("threads=" + threads);
getLog().info("enableJspTagPooling=" + enableJspTagPooling);
getLog().info("trimSpaces=" + trimSpaces);
getLog().info("genStringAsCharArray=" + genStringAsCharArray);
getLog().info("compilerVersion=" + compilerVersion);
getLog().info("compilerClass=" + compilerClass);
// But when setting the context of the JSPC used underneath there is no indication of usage of that variable (ignoreJspFragmentErrors)JspCContextAccessorjspc = newJspCContextAccessor();
jspc.setWebXmlInclude(getwebXmlFragmentFilename(threadIndex));
jspc.setUriroot(webAppSourceDirectory);
jspc.setPackage(packageRoot);
jspc.setOutputDir(generatedClasses);
jspc.setValidateXml(validateXml);
jspc.setClassPath(classpathStr.toString());
jspc.setCompile(true);
jspc.setSmapSuppressed(suppressSmap);
jspc.setSmapDumped(!suppressSmap);
jspc.setJavaEncoding(javaEncoding);
jspc.setFailOnError(stopAtFirstError);
jspc.setPoolingEnabled(enableJspTagPooling);
jspc.setTrimSpaces(trimSpaces ? TrimSpacesOption.TRUE : TrimSpacesOption.FALSE);
jspc.setGenStringAsCharArray(genStringAsCharArray);
jspc.setCompilerSourceVM(compilerVersion);
jspc.setCompilerTargetVM(compilerVersion);
jspc.setcompilerClass(compilerClass);
jspc.setResourcesCache(resourcesCache);
furthermore, that flag is not used in any of the underlining validation in the code. The only alternative solution, that we found, is to exclude those files from the scan.
We were wondering if our analysis is valid and raise this bug if it's the case.
If it's not valid can you please provide us an example on how to use that flag with JSP fragment files.
Thanks.
The text was updated successfully, but these errors were encountered:
You might be right. Some options have never been tested afaik, and it could just send it to /dev/null. I will try to look at this if I can to fix it but no guarantee Im sorry. If you have already the fix ou if you can make it, do the PR I will be happy to take a look at this
First of all thank you for this updated version.
We are having a legacy stack with a web-app that is based on JSPs and, using this plugin, we want to validate the JSPs pages compilation before going to production.
The problem is that we found that setting
ignoreJspFragmentErrors
totrue
and usingjspf
as fragment file doe not work and the plugin is scanning them anyway.We found in the code of the plugin that the variable
ignoreJspFragmentErrors
is used only in the logger and never passed along to the JSP compiler as shown in the snippetfurthermore, that flag is not used in any of the underlining validation in the code. The only alternative solution, that we found, is to exclude those files from the scan.
We were wondering if our analysis is valid and raise this bug if it's the case.
If it's not valid can you please provide us an example on how to use that flag with JSP fragment files.
Thanks.
The text was updated successfully, but these errors were encountered: