Migrating JSP file

You can migrate JSP Tablib uri, BTT customized tag, page import, and Java code in JSP file. The migration rules of taglib uri and BTT customized tag are defined in the JSP migration rule file. The migration rules of Java code are defined in Java migration rule file.

To migrate JSP file, perform the following steps:
  1. Select the JSP file and right-click it.
  2. In the menu that pops up, click BTT Migration > Migrate JSP file as shown in the following screen capture.

    Screen capture of the menu

  3. The JSP file is then migrated to the jsp.migrated folder.

    Screen capture of the jsp.migrated folder

  4. During the migration, all the activities are recorded into the report_jsp.txt file. The tool also provides migration recommendations in the recommand_jsp.txt file. You can use these two files to judge if you need to do any further migration manually. All the report files and recommendation files are generated in a folder named report.
The tool supports multiple JSP files migration. You can migrate multiple JSP files at one time. Use one of the following ways to do the multiple JSP files migration:
  1. Select all the JSP files you want to migrate, and right-click them and then select BTT Migration > Migrate JSP file. Then all the JSP files are migrated.
  2. Select a folder which contains multiple JSP files that you want to migrate, and right-click the folder and then select BTT Migration > Migrate JSP files. Then all the JSP files in this folder are migrated.

Following are the samples for each migration type:

Table 1. Taglib uri migration
Before migration Migration rule After migration
<%@ taglib uri="/WEB-INF/dse.tld" prefix="dse" %> <taglibRule oldTagUrl="/WEB-INF/dse.tld" newTagUrl="/WEB-INF/btt.tld" oldTagPrefix="dse" newTagPrefix="btt"/> <%@ taglib uri="/WEB-INF/btt.tld" prefix="btt" %>
Table 2. Tag migration
Before migration Migration rule After migration
<dse:label text="jspMigrationToolTest"/> <tagRule oldTitle="dse:label" newTitle="btt:label" oldKey="text" newKey="text_new"
oldVal="jspMigrationToolTest" newVal=
"jspMigrationToolTest_new"/>
<btt:label text_new="jsp
MigrationToolTest_new"/>
Table 3. Page import migration
Before migration Migration rule After migration
<%@page import="com.ibm.dse" %> <pageImport oldPattern="com.ibm.dse" newPattern="com.ibm.btt"/> <%@page import=“com.ibm.btt"%>
Table 4. Java code migration
Before migration Migration rule After migration
com.ibm.dse.base.
JavaExtensions.getAlphaUniqueCode()
<simpleRule oldItem="com.ibm.dse" newItem="com.ibm.btt" /> com.ibm.btt.base.
JavaExtensions.
getAlphaUniqueCode()