[izpack-users] IzPack XML variable substitution...

Ajay Kumar Gour ajay.g at s7solutions.com
Tue Dec 4 14:18:13 CET 2007

Hello All,

I am fairly new to the IZpack and just now i have started using it. I want  
to use it as an installer for one of my application, which requires to set  
the XML configuration properties for the application. To be more  
technical, I want to UserInput panel to take input from user and set these  
values in the XML file (which contains the configuration properties).

Problem is - User input is not reflected back in XML configuration file.

Please somebody help me sorting it out.

Any help would be highly appreciated.

Here is my configuration file where i need to set values -

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
	<category name="general">
		<property name="PORT" value=""/>

UserInputSpec.xml file -

<panel order="0">
	<!--field type="staticText" align="left" txt="My comment is here."  
	<field type="text" variable="PORT">
		<spec txt="Proxy Port:" id="PORT" size="6" set=""/>

And finally, install.xml

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>

<installation version="1.0">
         <appname>Blueoptima Connector Server</appname>
             <author name="Jason Rolles"  
email="Jason.Rolles at blueoptima.com"/>

		<variable name="PORT" value="9999"/>

     <guiprefs width="640" height="480" resizable="no"/>

         <langpack iso3="eng"/>

         <res id="LicencePanel.licence" src="Licence.txt"/>
         <res id="InfoPanel.info" src="Readme.txt"/>
         <res id="userInputSpec.xml" src="userInputSpec.xml"/>

         <panel classname="HelloPanel"/>
         <panel classname="InfoPanel"/>
         <panel classname="LicencePanel"/>
         <panel classname="TargetPanel"/>
         <panel classname="UserInputPanel"/>
         <panel classname="PacksPanel"/>
         <panel classname="InstallPanel"/>
         <panel classname="FinishPanel"/>

         <pack name="Base" required="yes">
             <description>The base files</description>
             <file src="Readme.txt" targetdir="$INSTALL_PATH"/>
             <file src="Licence.txt" targetdir="$INSTALL_PATH"/>
             <file src="script.bat" targetdir="$INSTALL_PATH"/>
             <file src="myconfiguration.xml" targetdir="$INSTALL_PATH"/>
             <parsable targetfile="$INSTALL_PATH/myconfiguration.xml"  
type="xml"/> <!-- The file will be parsed -->
             <parsable targetfile="$INSTALL_PATH/script.bat"/> <!-- The  
file will be parsed -->
         <pack name="Docs" required="no">
             <description>The documentation</description>
             <file src="doc" targetdir="$INSTALL_PATH"/> <!-- Reccursive  
adding -->
         <pack name="Sources" required="no">
             <description>The sources</description>
             <file src="src" targetdir="$INSTALL_PATH"/>


More information about the izpack-users mailing list