Package com.sun.enterprise.deploy.shared

Examples of com.sun.enterprise.deploy.shared.FileArchive


  if (!descriptor.getJspDescriptors().isEmpty()) {
      boolean oneFailed = false;
      boolean foundIt = false;
//            ZipEntry ze=null;
//            JarFile jar=null;
            FileArchive arch=null;
      // get the jsps in this .war
      Set jsps = descriptor.getJspDescriptors();
      Iterator itr = jsps.iterator();
      // test the jsps in this .war
      while (itr.hasNext()) {
    foundIt = false;
    WebComponentDescriptor jsp = (WebComponentDescriptor)itr.next();
    String jspFilename = jsp.getWebComponentImplementation();
            String uri = null;
                try{
//                    File f = Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());
//                    if(f==null){
                        uri=getAbstractArchiveUri(descriptor);
                        try{
                            arch = new FileArchive();
                            arch.open(uri);
                        }catch(IOException e){throw e;}
//                    }
//                    else{
//                        jar = new JarFile(f);
//                    }
                   
                    if (jspFilename.startsWith("/"))
                        jspFilename = jspFilename.substring(1);
//                    if(f!=null){
//                        ze = jar.getEntry(jspFilename);
//                        foundIt=(ze !=null);
//                    }else{
                        File jspf = new File(new File(arch.getURI()), jspFilename);
                        if(jspf.exists())
                            foundIt=true;
                        jspf = null;                
//                    }
//                    if (jar!=null)
View Full Code Here


           try {
         
//             if (f == null) {
                 String uri = getAbstractArchiveUri(descriptor);
//                 try {
                    FileArchive arch = new FileArchive();
                    arch.open(uri);
                    deploymentEntry = arch.getEntry(mappingFile);
//                 }catch (IOException e) { throw e;}
//                }
//                else {
//
//                  jarFile = new JarFile(f);
View Full Code Here

  if (descriptor.getLoginConfiguration() != null) {
      boolean foundIt = false;
//            ZipEntry ze=null;
//            JarFile jar=null;
            FileArchive arch=null;
           
      String formErrorPage = descriptor.getLoginConfiguration().getFormErrorPage();
            if (formErrorPage.length() > 0) {
        
                try{
                   
//                    File f = Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());
//                    if(f==null){
                       
                        String uri=getAbstractArchiveUri(descriptor);
                       
                        try{
                            arch = new FileArchive();
                            arch.open(uri);
                        }catch(IOException e){
                            throw e;
                        }
//                    }else{
//                        jar = new JarFile(f);
//                    }
                    if (formErrorPage.startsWith("/"))
                        formErrorPage=formErrorPage.substring(1);
//                    if (f!=null){
//                        ze = jar.getEntry(formErrorPage);
//                        foundIt = (ze != null);
//                    }
//                    else{
                        File fep = new File(new File(arch.getURI()), formErrorPage);
                        if(fep.exists())
                            foundIt=true;
                        fep = null;
//                    }
//                    if (jar!=null)
View Full Code Here

       
        File file = getVerifierContext().getOutDir();
        if(!file.exists())
            return results;

        FileArchive arch= new FileArchive();
        arch.open(file.toURI());
        Enumeration entries = arch.entries();
        while(entries.hasMoreElements()){
            String name=(String)entries.nextElement();
            if(name.startsWith("org/apache/jsp") && name.endsWith(".class"))
                results.add(name.substring(0, name.lastIndexOf(".")).replace('/','.'));
        }
View Full Code Here

        */
       
        // let's get the rar file
        try {
            String uri=getAbstractArchiveUri(desc);
            FileArchive arch = new FileArchive();
            arch.open(uri);
            for(Enumeration en = arch.entries();en.hasMoreElements();) {                   
                String entry = (String)en.nextElement();
                if (entry.endsWith(".jar")) {
                    // we found a jar file, let's load it
                    JarInputStream jis = new JarInputStream(arch.getEntry(entry));
                    try {
                        // Now we are going to iterate over the element of the jar file
                        ZipEntry ze = jis.getNextEntry();
                        while(ze!=null) {
                            String elementName = (String) ze.getName();
View Full Code Here

  if (((WebBundleDescriptorImpl)descriptor).getErrorPageDescriptors().hasMoreElements()) {
      boolean oneFailed = false;
      boolean foundIt = false;
//            ZipEntry ze = null;
//            JarFile jar =null;
            FileArchive arch=null;
      // get the errorpage's in this .war
      for (Enumeration e = ((WebBundleDescriptorImpl)descriptor).getErrorPageDescriptors() ; e.hasMoreElements() ;) {
    foundIt = false;
    ErrorPageDescriptor errorpage = (ErrorPageDescriptor) e.nextElement();
    String location = errorpage.getLocation();
            String uri = null;
                try{
//                    File f = Verifier.getArchiveFile(descriptor.getModuleDescriptor().getArchiveUri());
//                    if(f==null){
                        uri=getAbstractArchiveUri(descriptor);
                        try{
                            arch = new FileArchive();
                            arch.open(uri);
                        }catch(IOException ioe){throw ioe;}
//                    }else{
//                        jar = new JarFile(f);
//                    }
                    if (location.startsWith("/"))
                        location = location.substring(1);
//                    if (f!=null){
//                        ze = jar.getEntry(location);
//                        foundIt = (ze != null);
//                    }
//                    else{
                        File loc = new File(new File(arch.getURI()), location);
                        if(loc.exists())
                            foundIt=true;
                        loc = null;
//                    }
//                    if (jar!=null)
View Full Code Here

                    return result;
                }
            }
            try {
                String uri = getAbstractArchiveUri(descriptor);
                FileArchive arch = new FileArchive();
                arch.open(uri);
                deploymentEntry = arch.getEntry(wsdlUri);

                if (deploymentEntry == null) {
                    //result.fail,
                    result.addErrorDetails(smh.getLocalString ("tests.componentNameConstructor",
                            "For [ {0} ]", new Object[] {compName.toString()}));
View Full Code Here

      // continue...
//           if (applicationJarFile == null) {
               String uri = getAbstractArchiveUri(descriptor);
               try {
                 FileArchive arch = new FileArchive();
                 arch.open(uri);
                 deploymentEntry = arch.getEntry(
                       DescriptorConstants.APP_CLIENT_DD_ENTRY);
               }catch (IOException e) { throw e;}
//            }
//            else {
//
View Full Code Here

                       
      try {
//                            if (f==null){
                                String uri = getAbstractArchiveUri(descriptor);
//                                try {
                                    FileArchive arch = new FileArchive();
                                    arch.open(uri);
                                    deploymentEntry = arch.getEntry(acd.getModuleDescriptor().getAlternateDescriptor());
//                                }catch (Exception e) { }
//                            }else{
//
//                                jarFile = new JarFile(f);
//                                ZipEntry deploymentEntry1 = jarFile.getEntry(acd.getModuleDescriptor().getAlternateDescriptor());
View Full Code Here

                       
      try {
//                            if (f==null){
                                String uri = getAbstractArchiveUri(descriptor);
//                                try {
                                    FileArchive arch = new FileArchive();
                                    arch.open(uri);
                                    deploymentEntry = arch.getEntry(wbd.getModuleDescriptor().getAlternateDescriptor());
//                                }catch (Exception e) { }
//                            }else{
//
//                                jarFile = new JarFile(f);
//                                ZipEntry deploymentEntry1 = jarFile.getEntry(wbd.getModuleDescriptor().getAlternateDescriptor());
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deploy.shared.FileArchive

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.