iManager 1.5 to 2.0 Migration Tools
June 2003

Table of Contents

1.0  Introduction

2.0  Using the Migration Tools
     2.1  ConvertToJsp
     2.2  SnR

3.0  Legal Notices


1.0  Introduction

     The iManager 2.0 SDK includes the following tools for automating the
     conversion of version 1.5 HTT templates to version 2.0 JSPs:

     -  ConvertToJsp - Converts .htt, .inc, .applet, and .css files to
        JSPs.
     -  SnR (Search and Replace) - Updates links to files such as images,
        include files, JavaScripts, and style sheets, so they are
        compatible with the iManager 2.0 directory structure.


2.0  Using the Migration Tools

     This section explains how to use the migration tools. Before using
     these tools, you should be familiar with the migration concepts
     found in the "Converting an iManager 1.5 Plug-In to a Task Gadget"
     section of the iManager 2.0 Developer Kit documentation
     (doc/imgr2sdk/imgr_enu/imgr_enu.pdf).

     2.1  ConvertToJsp

          ConvertToJsp is a Java class
          (com.novell.webaccess.common.ConvertToJsp) packaged in the
          njweb.jar file. You must have njweb.jar and servlet.jar in your
          classpath. To run the program, issue the following command:

          java.exe -classpath njweb.jar;servlet.jar
          com.novell.webaccess.common.ConvertToJsp [-j <JspDir>]
          <filespec>

          Substitute the name of a template or the name of a directory
          with <filespec>.  If you specify a directory, all of the
          templates in that directory and in its subdirectories are
          converted.

          <JspDir> is the directory where you want the new JSP files to
          be created. If you do not use the -j option, the generated
          output files are located as follows:

          -  If converting a single file, the JSP file is created in the
             same directory as the template file being converted.
          -  If converting a directory, the JSP files are created in a
             directory named jsp. The jsp directory is a sibling to the
             directory specified on the command line (a sibling to
             <filespec>).


     2.2  SnR

          After the JSP conversion has been run to create the JSP pages,
          the pages need to be updated to run in the new portal
          environment. This consists mostly of updating links to images,
          include files, javascripts, style sheets, etc. To aid with this
          update, you can use the search and replace utiltity. This
          utility is a Java class file called SnR.class and is located in
          the SDK under the migration directory.

          To run the search and replace utility, use the following
          command, where <input_file> is the file containing the strings
          that are to be replaced and <output_file> is a copy of
          <input_file> with the strings replaced:

          Java.exe -classpath ./;njweb.jar SnR <input_file> -o
          <output_file> [<options>]

          The SnR options are as follows:

          -  -p <properties_file>, where <properties_file> is the name of
             the properties file containing the search and replace
             parameters
          -  -l <log_file>, where <log_file> is the name of the log file
             where all changes are logged. All logging messages are
             written to the screen regardless of whether this option is
             used
          -  -s, which specifies that subdirectories should not be
             included. This option is valid only when <input_file> is the
             name of a directory
          -  -h, which displays the command line options

          SnR.properties is a Java properties file containing search and
          replace strings that are matched together numerically. For
          example, the keys search.1 and replace.1 together specify a
          search and replace operation. The characters * and ? are used
          in the search pattern. The values they represent can be added
          to the replacement string using {0}, {1}, {2}, etc. where {0}
          is the first asterisk or question mark, {1} is the second, and
          so on. For examples, examine the SnR.properties file. Also, for
          additional information on creating search and replace strings,
          read the notes at the top of the file.


3.0  Legal Notices

     Novell, Inc. makes no representations or warranties with respect to
     the contents or use of this documentation, and specifically
     disclaims any express or implied warranties of merchantability or
     fitness for any particular purpose. Further, Novell, Inc. reserves
     the right to revise this publication and to make changes to its
     content, at any time, without obligation to notify any person or
     entity of such revisions or changes.

     Further, Novell, Inc. makes no representations or warranties with
     respect to any software, and specifically disclaims any express or
     implied warranties of merchantability or fitness for any particular
     purpose. Further, Novell, Inc. reserves the right to make changes to
     any and all parts of Novell software, at any time, without any
     obligation to notify any person or entity of such changes.


     You may not export or re-export this product in violation of any
     applicable laws or regulations including, without limitation, U.S.
     export regulations or the laws of the country in which you reside.

     All files provided in this release are subject to the Novell
     Developer Kit license Agreement and Separate Limited Warranty, which
     can be found in the license.txt file provided in this download.


     Copyright © 2003 Novell, Inc. All rights reserved. No part of this
     publication may be reproduced, photocopied, stored on a retrieval
     system, or transmitted without the express written consent of the
     publisher.


     Novell is a registered trademark of Novell, Inc. in the United
     States and other countries.


     All third-party trademarks are the property of their respective
     owners.



