The session-config element defines the session parameters for this web application
The deployment descriptor instance file must not contain multiple elements of session-config.
Result result = getInitializedResult();
ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
//This test is not applicable for application based on Servlet Spec 2.3
String prefix = XpathPrefixResolver.fakeXPrefix;
String query = prefix + ":" + "web-app/" + prefix + ":" + "session-config";
int count = getNonRuntimeCountNodeSet(query);
if ( count == 0 || count == -1) {
addNaDetails(result, compName);
result.notApplicable(smh.getLocalString
(getClass().getName() + ".notApplicable",
"Not Applicable: Servlet session-config element is not Specified."));
} else if ( count == 1 ) {
addGoodDetails(result, compName);
result.passed(smh.getLocalString
(getClass().getName() + ".passed" ,
"The session-config element is specified correctly"));
} else if ( count > 1 ) {
addErrorDetails(result, compName);
result.failed(smh.getLocalString
(getClass().getName() + ".failed",
"The deployment descriptor instance contains multiple elements of session-config element"));
}
return result;