CMS Snapshot Analysis - Run Analyzer - Missing objects - JEE with Core CAST AIP - Missing JSP artifacts

Description

Some of the artifacts from jsp files, which were getting created on 7.3.3 version are not getting created on higher versions.

Observed in CAST AIP

ReleaseYes/No
8.3.x
8.2.x
8.1.x
8.0.x
7.3.x
7.2.x
7.0.x

Observed on RDBMS

RDBMSYes/No
Oracle Server
Microsoft SQL Server
CSS3
CSS2
CSS1

Step by Step Scenario

  1. Configure analysis of JSP files
  2. Run analysis
  3. Check in Enlighten

Action Plan

In the analysis log file,you may find the following warnings:

Syntax not recognized: \n--------------------------^

The syntax error pointed out is for white spaces.If we have a multi-line JSP comment within the script tag,it is converted into the HTML comment before being fed into the JavaScript parser. This results in the syntax error in the JavaScript parser and hence the missing objects.

Example:

<script language = "javascript"> 
 <%--
        document.getElementById("<%=inputTxtTextFieldName%>").value   ='<%=WebUtil.formatStringForRTF((strCommentAttribute != null)?strCommentAttribute:"")%>';
  --%>
 &lt;/script>
  1. If the problem is with some files, the workaround is to change this comment into a single line comment and then run the analysis.
    Example:

<script language = “javascript”> <%–document.getElementById("<%=inputTxtTextFieldName%>").value =’<%=WebUtil.formatStringForRTF((strCommentAttribute != null)?strCommentAttribute:"")%>’;–%> </script>

2. If the problem is with many files,the workaround would be to use text replacement for the multiple line comment.
  1. Replace (<%–\s*) with <%–
  2. Replace (\s*–%>) with –%>

   ![](https://doc-data.castsoftware.com/TG/attachments/566533851/566533853.jpg)

**Impact on Analysis Results and Dashboard**

No impact

**Notes/comments**

Ticket # 3012

**Related Pages**