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
Release
Yes/No
8.3.x(error)
8.2.x(error)
8.1.x (error) 
8.0.x (tick) 
7.3.x(tick)
7.2.x(error)
7.0.x(error)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS3(error)
CSS2(tick)
CSS1(error)
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:"")%>';
  --%>
 </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 --%>

Impact on Analysis Results and Dashboard

No impact

Notes/comments
Ticket # 3012
Related Pages