The web installers feature allows users to download a small initial installer that does not contain the files to install. These files will be downloaded from a HTTP server of your choice, like Apache HTTPD. If the installer contains many optional packs, this facility can save resources.

The principle is easy: People download a small JAR file containing the installer, they launch it and choose their packages. Then the installer will get the required packages containing the files to install from individual Jar files located on a server, only downloading those required.

To create a web installer, add the nested <webdir> element to the <info> section, referring to a valid URL. The contained text must be a valid, fully qualified URL referring to a directory on the web server.

<info>
  <appname>Super extractor</appname>
  <appversion>2.1 beta 6</appversion>
  <url>http://www.superextractor.com/</url>
  <webdir>http://www.superextractor.com/download</webdir>
</info>

By default, the compiler will create a standard installer even if webdir is specified. The web installer can be generated with the web option like this:

Maven:

In Maven, set the <kind> configuration option to "web" to activate this feature:

<plugin>
    <groupId>org.codehaus.izpack</groupId>
    <artifactId>izpack-maven-plugin</artifactId>
    <extensions>true</extensions>
    <configuration>
      ...
      <kind>web</kind>
      ...
    </configuration>
</plugin>

Ant:

For the Ant build, the installerType attribute must be set to "web" for this purpose:

<izpack input="install.xml"
                output="IzPack-install.jar"
                installerType="web"
                inheritAll="true"
                basedir="${basedir}"
                izPackDir="${user.home}/IzPack/" />

Command line:

compile installer.xml -k web


All these variants of compiling will generate a jar for each pack and an installer jar. For instance, the sample installation will generate those 4 jars.

install.jar
install.pack-Base.jar
install.pack-Docs.jar
install.pack-Sources.jar

The pack jars must be copied to the directory the URL in webdir is referring to at the HTTP server. The generated installer is configured as a web installer and will download those packs if necessary.

When installing, if the user is behind a firewall, attempting download the jar files may fail. If this happens, the user will be prompted to enter the host name and port of their firewall.

You may password protect the files using mechanisms provided by your web server, IzPack will prompt for a password at install time, when required.