FileDocCategorySizeDatePackage
Taglib.javaAPI DocGlassfish v2 API3762Fri May 04 22:34:10 BST 2007com.sun.enterprise.tools.verifier.tests.web

Taglib

public abstract class Taglib extends WebTest
author
Arun Jain

Fields Summary
Constructors Summary
Methods Summary
public booleancheck(WebBundleDescriptor descriptor, java.lang.String taglibEntry, com.sun.enterprise.tools.verifier.Result result)

param
descriptor the Web deployment descriptor
return
Result the results for this assertion

        
        ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
        String uri = getAbstractArchiveUri(descriptor);
        
        if (taglibEntry.startsWith("/"))
            taglibEntry = taglibEntry.substring(1);
        else taglibEntry = "WEB-INF/" + taglibEntry;
        File tlf = new File(uri + File.separator + taglibEntry);
        if (tlf.exists()) {
            result.addGoodDetails(smh.getLocalString
                    ("tests.componentNameConstructor",
                            "For [ {0} ]",
                            new Object[] {compName.toString()}));
            result.addGoodDetails(smh.getLocalString
                    (getClass().getName() + ".passed",
                            "Tag library/.tld file exist in web application."));
            return true;
        }
        result.addErrorDetails(smh.getLocalString
                ("tests.componentNameConstructor",
                        "For [ {0} ]",
                        new Object[] {compName.toString()}));
        result.addErrorDetails(smh.getLocalString
                (getClass().getName() + ".failed",
                        "[ {0} ] is not a valid tld location.", new Object[] {taglibEntry}));
        return false;