1 23 24 25 26 package com.sun.enterprise.tools.verifier.tests.web.ias; 27 28 import java.util.*; 29 import com.sun.enterprise.deployment.*; 30 import com.sun.enterprise.tools.verifier.*; 31 import com.sun.enterprise.tools.verifier.tests.*; 32 import com.sun.enterprise.deployment.ResourceReferenceDescriptor; 33 import com.sun.enterprise.deployment.WebBundleDescriptor; 34 import com.sun.enterprise.tools.verifier.tests.web.*; 35 import com.sun.enterprise.tools.common.dd.webapp.*; 36 37 40 42 public class ASJSPConfig extends WebTest implements WebCheck{ 43 44 45 public Result check(WebBundleDescriptor descriptor) { 46 47 48 Result result = getInitializedResult(); 49 WebComponentNameConstructor compName = new WebComponentNameConstructor(descriptor); 50 boolean oneFailed = false; 51 boolean notApp = false; 52 JspConfig jspConfig = descriptor.getIasWebApp().getJspConfig(); 53 54 WebProperty[] webProps=null; 55 56 if(jspConfig !=null) 57 webProps = jspConfig.getWebProperty(); 58 59 if (jspConfig!=null && webProps!=null && webProps.length > 0) { 60 61 if(ASWebProperty.checkWebProperties(webProps,result ,descriptor, this )){ 62 oneFailed=true; 63 result.failed(smh.getLocalString 64 (getClass().getName() + ".failed", 65 "FAILED [AS-WEB sun-web-app] jsp-config - Atleast one name/value pair is not valid in [ {0} ].", 66 new Object [] {descriptor.getName()})); 67 } 68 69 } else { 70 notApp=true; 71 result.notApplicable(smh.getLocalString 72 (getClass().getName() + ".notApplicable", 73 "NOT APPLICABLE [AS-WEB sun-web-app] jsp-config element not defined in the web archive [ {0} ].", 74 new Object [] {descriptor.getName()})); 75 } 76 if (oneFailed) { 77 result.setStatus(Result.FAILED); 78 } else if(notApp) { 79 result.setStatus(Result.NOT_APPLICABLE); 80 }else { 81 result.setStatus(Result.PASSED); 82 result.passed 83 (smh.getLocalString 84 (getClass().getName() + ".passed", 85 "PASSED [AS-WEB sun-web-app] jsp-config elements are valid within the web archive [ {0} ].", 86 new Object [] {descriptor.getName()} )); 87 } 88 return result; 89 } 90 91 } 92 93 | Popular Tags |