Updating Template Content in SAS Web Application Projects That Use the SAS Web Infrastructure Platform

Update Content for a SAS Web Infrastructure Platform Application Metadata Creation Template

The following two processes update the content from a SAS Web Infrastructure Platform Application Metadata Creation template to work with a new SAS 9.3 EBI server by re-applying the template to the project and selecting the SAS 9.3 BI Server Profile that you want to use with the project.
The AppDev Studio Template Wizard stores the multicast address and port of the last SAS BI Server Profile that a project used in the project's .SASTemplateResources file. To remove the relevant lines from that file and force the project to reacquire the multicast properties for use in the launchparameters.txt file, follow these steps:
  1. In the Navigator view, expand the root folder of the project to update.
  2. Right-click the .SASTemplateResources file and select Open Withthen selectText Editor.
  3. Delete these two lines and all intervening lines:
    <managed-parameter name="multicast.launch.system.properties">
    [...]
    </managed-parameter>
  4. Save and close the file.
To reapply the metadata creation template, follow these steps:
  1. Expand the project's metadata folder.
  2. If manual changes have been made to the Application.xml file in that folder, or if you are unsure if manual modifications have been made, rename the Application.xml file to Application92.xml.
  3. From the main menu, select Filethen selectNewthen selectOther.
  4. Expand SAS AppDev Studio, select Add Template Content to Project, and click Next.
  5. In the Project field, select the project to update.
  6. In the Templates tree, expand the SAS Java Web Application and SAS Web Infrastructure Platform Support categories, and then select SAS Web Infrastructure Application Metadata Creation. Click Next.
  7. When the Template Wizard fails to display the SAS BI Server Profile for the old, invalid multicast address and port, a new profile called Auto-created Profile is generated. This generated SAS BI Server Profile contains the stored multicast address and port and the defaults for all remaining settings.
    When AppDev Studio attempts to acquire the BI Server information for an Auto-created Profile, click Cancel, or allow the acquisition to fail. Failure takes approximately 20 seconds.
  8. Select a valid BI Server Profile.
  9. Update the Application Name and Description.
  10. Delete the contents of the Application ID field.
  11. Update the Protocol, and Web Server Host and port to match the ADS Apache Tomcat server (or server of your choice).
  12. Click Finish to apply the template.
  13. If you saved a copy of the original Application.xml in step 2, select both Application.xml and Application92.xml and select Compare Withthen selectEach Other. Port any other changes to the new Application.xml file.
  14. Remove the automatically generated profile.
    1. Select Windowthen selectPreferences.
    2. Expand SAS AppDev Studio and select SAS BI Profiles.
    3. From the BI Server Profile list, select the Auto-created Profile, and click Remove.
    4. Confirm the deletion, and then click OK.
Be sure to run the script to actually create the server metadata.

Remove Content for an Information Map Viewer Servlet (uses SAS Visual Data Explorer and SAS WIP) Template

Because the SAS Visual Data Explorer is no longer available in SAS 9.3, content from the Information Map Viewer Servlet (uses SAS Visual Data Explorer and SAS WIP) template must be removed from your project. To prevent these templates from being displayed by the Examples Welcome File page, follow these steps:
  1. In the Project Explorer, expand the Java Resources folder, the src folder, and then the folder or folders that represent the packages where the servlets for the Information Map Viewer Servlet template were placed. The default folder is servlets.
  2. In the WEB-INF folder, right-click the sas-examples.xml file and open it with a Text Editor or XML Editor.
  3. In the editor, delete the <type> element (and its children) whose name attribute is Information Map Viewer Servlet (uses SAS Visual Data Explorer and SAS WIP). Save and close the file.
To find the servlets to delete, continue with these steps:
  1. In the WEB-INF folder, right-click the web.xml file, and open it with a Text Editor or XML Editor.
  2. In the spring-config folder, right-click the webapp-config.xml file, and open it with a Text Editor or XML Editor.
  3. From the main menu, select Searchthen selectFile.
  4. In the Search dialog box, enter VisualDataExplorerServlet in the Contains text field.
  5. Enter *.java in the File name patterns field.
  6. Select Enclosing projects for the Scope, and click OK to perform the search.
    All occurrences of the VisualDataExplorerServlet string are displayed. The string will appear twice in any servlet produced by the Information Map Viewer Servlet (uses SAS Visual Data Explorer and SAS WIP) template.
    For each servlet Java file that appears in the Search view, perform the following steps:
    1. In the web.xml file, delete the <servlet> element whose <servlet-name> element contains the servlet base name. Also delete all of its children.
    2. Also in the web.xml file, delete the <servlet-mapping> element whose <servlet-name> element contains the servlet base name. Also delete all of its children.
    3. In the webapp-config.xml file, delete the <bean> element whose id attribute contains the name of the Java file without the .java extension.
    4. In the WebContent folder, right-click the JSP file that corresponds to the servlet Java file and select Delete. The JSP filename follows the pattern <servletBaseName>Viewer.jsp.
    5. Right-click the servlet Java file and select Delete.
Remove any other servlets not identified in the search. Save and close both the web.xml file and the webapp-config.xml file.

Update Content for a Report Viewer Servlet (uses SAS Web Report Viewer and SAS WIP) Template

Because the SAS Visual Data Explorer and the Information Map Viewer Servlet template are no longer available, the ability to display a SAS Information Map is now provided by the Report Viewer Servlet (uses SAS Web Report Viewer and SAS WIP) template.
Both SAS Web Report Viewer and SAS Web Report Studio can display reports that are generated from an Information Map. However, these generated reports do not support all the features of the now-deprecated SAS Visual Data Explorer, nor do SAS Web Report Viewer and SAS Web Report Studio always deal with Information Map features in the same way. For example, if you generate a report from an Information Map with a filter that uses a prompt, SAS Web Report Viewer and Web Report Studio handle the prompt differently. To achieve equivalent functionality, a new report must be created based on the Information Map. Similarly, because Data Explorations cannot be displayed by SAS Web Report Viewer or SAS Web Report Viewer Studio, a new report is required.
To manually update all the Report Viewer Servlet templates in your project to display Information Maps without reapplying the template, follow these steps:
  1. Select the project to update.
  2. From the main menu, select Searchthen selectFile.
  3. In the Contains text field, enter:
    filterList.add("Report");
  4. In the File name patterns field, enter *.java.
  5. For the Scope select Enclosing projects, and click OK to perform the search.
  6. For each occurrence of filterList.add("Report"); in the Search view, perform the following:
    1. From the main menu, select Navigatethen selectNext Match. This will open the Java file in an editor and take you to the line where the text was found.
    2. Above the filterList.add("Report"); line add a new line:
      filterList.add("InformationMap");
    3. Save and close the file.
Rebuild the project if it is not building automatically.

Update the Java Files for a SAS Stored Process Servlet (uses SAS WIP) Template

This process updates the StoredProcessConnection.java and StoredProcessFacade.java files for the SAS Stored Process Servlet template that uses the Web Infrastructure Platform. If you are using Foundation Services, see Update the Java Files for a SAS Stored Process Servlet (uses SAS FS) Template.
There are two ways to update these Java files, which are produced by the SAS Stored Process Servlet (uses SAS WIP) template. The first way is to add a new stored process template to the project. The addition of the template updates the Java files automatically.
The second way, documented here, is to copy the Java files from a new, temporary project that uses the AppDev Studio 3.41 SAS Web Infrastructure Platform and then insert them into the migrated project. Follow these steps to create the temporary project and add the stored process template:
  1. Select Filethen selectNewthen selectOther, expand SAS AppDev Studio and select SAS Web Application Project. Then click Next.
  2. Enter a name for this temporary project and click Next.
  3. Enable Add Template Content, and select the SAS Stored Process Servlet (uses SAS WIP) template under the SAS Web Application Examples category. Click Next.
  4. Click Next and then select a BI Server Profile. Click Next again.
    The BI Server Remote Services for this profile must be running.
  5. If not already connected to a BI Server, click the Change button and log on.
  6. Click the Change button in the Stored Process section, and select a stored process. Click OK, and then Finish.
To copy the StoredProcessConnection.java and StoredProcessFacade.java files, follow these steps:
  1. In the Project Explorer view for the new temporary project, expand Java Resources, src, and support.storedprocess.
  2. Expand the same items in the project being migrated.
  3. Select both the StoredProcessConnection.java and StoredProcessFacade.java files in the source project, and then right-click and select Copy.
  4. In the migrated project, right-click on the support.storedprocess package, and select Paste.
  5. When prompted to confirm overwriting, click Yes to All.
    If either of the files in the migrated project are open in editors, switch to those editors and select Filethen selectSave.
    The Java files are now updated.
  6. Delete the temporary project.
Stored process servlets in the project being migrated will contain new generics warnings. These warnings can be suppressed by changing each of the @SuppressWarnings found in the Java file to @SuppressWarnings({“unchecked”, "rawtypes"}). You can also review how the warnings were addressed in the stored process servlet in a new project and make the same change in the migrated project.