- private static void usage(PrintStream out) {
- out.println("usage: dolda.jsvc.j2ee.Archive [-h] [-p PROPFILE] [-n DISPLAY-NAME] WAR-FILE JAR-FILE...");
+ private Properties props = defprops();
+ private JarOutputStream zipout = null;
+ private final OutputStream realout;
+
+ public Archive(OutputStream out) {
+ this.realout = out;
+ }
+
+ private void initzip() throws IOException {
+ Manifest man = new Manifest();
+ man.getMainAttributes().put(new Attributes.Name("Manifest-Version"), "1.0");
+ man.getMainAttributes().put(new Attributes.Name("Created-By"), "jsvc");
+ JarOutputStream zip = new JarOutputStream(realout, man);
+ zip.putNextEntry(new ZipEntry("WEB-INF/"));
+ zip.putNextEntry(new ZipEntry("WEB-INF/lib/"));
+ this.zipout = zip;
+ }
+
+ private ZipOutputStream zip() throws IOException {
+ if(zipout == null)
+ initzip();
+ return(this.zipout);