Novell is now a part of Micro Focus

iManager Questions and Answers

Articles and Tips: tip

Michael Spong
Novell, Inc.

01 Jun 2002

Why Won't My iManager Updates Show up?

As an iManager developer, you will naturally want to test template changes in your .HTT files. After you have copied your edited .HTT files to the \webapps\eMFrame\WEB-INF\classes\templates\browser\ndps\gatecfg directory, you will want to use a Web browser to view your changes.

The end of Chapter 4 of the iManager Developer Kit manual has a section on Caching Templates. The documentation incorrectly indicates that template files are not cached. By default, the template files are cached. You will need to disable caching on your Web server in order to view the changes you made to your template files.

To change the cache setting on the Web server, edit the \webapps\eMFrame\WEB-INF\eMFrame.cfg file. Change the cache enable parameter to the following:


You will need to restart your Web server and Tomcat for the changes to take effect. To do this, perform the following steps at the server console prompt:


How Do I Add an Input Field to an iManager Template?

  1. Edit the .properties file to include the strings for the prompts that you want to give. For example, add the following line to the file:

    DS.PrinterType=Printer Type:
  2. Edit the .htt file to prompt for the data. In the DSGatewayTemplate.htt file enter the following lines after the <!-- 3rd party input fields place below --> line:

    <BR>{STRING DS.PrinterType}<BR>
    <input type=text name="CreatePrinterType"
    value= "" size=35 maxlength=80>
  3. Edit the .java file to retrieve the parameters from the .htt file.

Declare the variable. In the public class DSGatewayTemplate of the file add the following declaration:

STRING printerType

Read the data from the .htt file. Under the comment //Retrieve parameter(s) that are set in the DSGatewayTemplate.htt, add the following line:

printerType = req.getParameter("CreatePrinterType");).

Now the variable "printerType" can be used in your Java code.

How Do I Add a Picture to an iManager Template?

For example, you may want to add a company logo or a picture of your product. Note that you have access to all of the graphics in the SYS:\WebApps\Images directory and below. This is strictly HTML coding, but here is an example of putting a picture of a question mark:

  1. Bring up the .htt file in an editor.

  2. Add the following line:

<IMG src='{VAR Templates.Images.url}/ndps/
printercontrol.gif' alt='{STRING ndps.Printer
Control.alt}' border="0">

How Do I Add a Web Page to the Flow of the User Interface in an iManager Template?

  1. Open the .htt template file that you want to launch your new interface window.

  2. Remove the following line:

<input type=hidden name="nextState" value=

iManager is based on a state-machine design. The line above issues the command to go to the next state (ConfigureGateway). In this example we want to collect more data from the user before we configure the gateway. The states for NDPS are as follows:

  • ConfigureGateway

  • doCreateBroker

  • doCreateManager

  • doCreatePrinter

  • doDeleteObject

  • doEnableIPP

  • doListPrinters

  • doSetDrivers

  • initialState

  • showEnableIPP

  • showListPrinters

  • populateDrivers

  • showListPrinters

  • done

  • Add the following line:

<input type=hidden name="merge"

The line above identifies which is the next JavaScript file to execute after this one. The parameter "merge" is the parameter that defines the next step if the current step is successful.

You may also add another line like this one to define which JavaScript file to execute in the event that this step is not successful; instead of the "merge" parameter, use the "error" parameter.

The value parameter identifies the name of the file to load. The complete path to the file is:


Notice that part of the path is missing from the parameter. This is because the Web server considers everything from the following directory and down as viewable by web browsers:


Also notice that the parameter replaces the back slashes with dots, and does not include the extension (.HTT) in the file name.

Finally, notice that the name of the file is the new JavaScript file that you created in Step 1.

How Do I Get User Input from Multiple iManager .HTT Template Files to a Single Java File?

This question is easiest to explain by example. In this example, there is an iManager template file called Template1.htt that is using JavaScript with a variable called VAR1. Template1.htt then follows with Template2.htt and has a variable called VAR2.

We want to send both VAR1 and VAR2 to a .java file. To do this, Template2.htt must contain the following line in order to get VAR1 from the Template1.htt:

<input type=hidden name="VAR1" value="{VAR

The .java file uses the following lines to retrieve the data from the .htt file:

String value1, value2;
value1 = req.getParameter("VAR1");
value2 = req.getParameter("VAR2");

* Originally published in Novell AppNotes


The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.

© Micro Focus