Importing existing Java applications from Apache Tomcat and WebSphere® Application Server Liberty profile application servers

If you have existing Java applications that have been deployed to a supported application server, you can automatically import them to AppScan® Source.

Before you begin

To learn which versions of Apache Tomcat and WebSphere® Application Server Liberty profile are supported, see the System requirements and installation prerequisites. At this page, select the tab for the version of AppScan® Source that you are using - and then select the AppScan® Source for Analysis component. Supported application servers can be found in the Supported Software section.

Procedure

  1. Complete one of these actions:
    • Select File > Add Application > Import from an application server from the main workbench menu.
    • In the Explorer view toolbar, click the Add Application Menu down-arrow button and select Import from an application server from the menu.
    • In the Explorer view, right-click All Applications and then select Add Application > Import from an application server from the menu.
  2. In the Import from Application Server dialog box, click Browse to find and select the location in which the application server is installed - or enter the server path and directory in the field and click Search to search for applications in the entered location. If the location is recognized as a supported application server, the available applications are listed in the Applications to import section of the dialog box. In this section, select the applications that you want to import and then click OK.
  3. An AppScan® Source application is created for each application imported from the application server.

Results

If you are importing from a WebSphere® Application Server Liberty profile server (WebSphere® Application Server Version 8.5 and higher), you may receive a message indicating that manual JSP precompilation is required. This occurs because the Liberty profile server does not include a stand-alone JSP compiler. If you receive this message, delete any applications that were created as a result of the import - and then follow the instructions in Generating precompiled JavaServer Pages for a WebSphere Application Server Liberty profile and import from the application server again.

When the application is imported, by default, AppScan® Source only scans its JSP files and the contents of web-inf/classes. The contents of web-inf/lib are not scanned. If you want other files to be scanned, you can use the project properties to set the additional file extensions to be scanned (see File Extensions). For example, if you want .jar files to be scanned (including those in web-inf/lib), follow the instructions for modifying project properties in Modifying application and project properties. In the Properties view for the project, select the File Extensions tab. In the Additional Extensions section of the view, click Add Extension. In the New Extensions dialog box, type jar in the Extension field - and then select Scan files with this extension and click OK. Click Save at the top right of the view (or select File > Save from the main menu) - and then scan the project again. If there are files that you do not want to be scanned, you can exclude them from scans using the Project view Sources tab.

If the applications on the server change and you want to refresh the AppScan® Source applications with the changed contents, you must complete the above steps again (you do not need to delete the originally-created applications first - AppScan® Source will delete them automatically upon reimport).

Note: If you import a .war file from a server and then import another .war file with the same name from another server, the second .war file will overwrite the first one. To prevent this, rename the second .war file before importing it.